[Webkit-unassigned] [Bug 27481] onbeforeunload not called at window close + frame or iframe focused

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 18 14:06:38 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=27481





--- Comment #39 from Charles Reis <creis at chromium.org>  2010-02-18 14:06:37 PST ---
(In reply to comment #38)
> Why would we need to clear the onbeforeunload handler in javascript?  Shouldn't
> navigating the frame clear the window object and any associated listeners?

That's a very good question, but I can only think that it has something to do
with the way the tests are run.  Two things that stand out to me: 

(1) Tests that set an unload listener end up having a "main frame - has 1
onunload handler(s)" line printed in their output, suggesting that DRT knows
about these handlers. 

(2) The other beforeunload tests I've found either clear the handler (e.g.,
fast/events/onunload-clears-onbeforeunload.html) or do nothing in it (eg.,
dom/Window/HTMLBodyElement-window-event-Listener-attributes.html).

I'm not familiar with how DRT deals with those event listeners, though.

BTW, I have a fix coming for the failed compile on the last patch.  It was just
a failed SVN merge on LayoutTestController.cpp, but I'm double checking that
the whole thing compiles and tests before uploading again.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list