Bug 474527 - onbeforeaccept handler in a <prefwindow> can't prevent the window from closing; r=enndeakin,MattN
The majority of the patch was by Gavin Sharp.