[Webkit-unassigned] [Bug 29193] [chromium] Need to prevent Javascript sleeps in unload handlers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 15 18:35:51 PDT 2009


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


Peter Kasting <pkasting at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pkasting at google.com




--- Comment #20 from Peter Kasting <pkasting at google.com>  2009-09-15 18:35:49 PDT ---
(In reply to comment #18)
> 4) To my mind, a better approach is that proposed by Peter in
> http://code.google.com/p/chromium/issues/detail?id=7823#c20 (and supported by
> Linus in http://code.google.com/p/chromium/issues/detail?id=7823#c49) is to
> hide tabs once the user clicks the close button.  John points out this has a
> number of strange corner cases involving zombie tabs reappearing from their
> hidden state.

Note that this does not solve the problem of navigating within the same tab
(which Darin has just noted).  For that, my proposal is basically that we look
to see if the old page was the only entity that would have been able to script
the new page (the common case), and if it was, we launch the new link in a
different process, which we let use this tab to render.  Meanwhile we run the
unload handler for the old tab.  The same sorts of issues as in the tab-closing
case apply: resurrecting hidden tabs and similar.

I also proposed we first give the renderer 100 ms to bring up UI (during which
we don't hide/swap out the tab) and then don't let it do so afterward (which
prevents the "zombie UI" issues), but Darin/John pointed out that if part of
the renderer was swapped out, it would be impossible to determine that the
renderer had had a fair opportunity to swap back in and work long enough to
avoid dataloss.  I'm not sure I have a way around that.

I hate the sleep()-killing idea but it might work (?).  However, doing it
assumes that we get <a ping> implemented in WebKit and Gecko, released to the
public, and evangelized to developers as the alternative here.  That needs to
happen anyway, of course, but I am leery of doing this change before then.

I am also more worried than both Darin and John about repercussions from doing
this (sites blacklisting Chrome/WebKit, underreporting of UAs so that sites
don't bother to make themselves work with Chrome/WebKit).

Perhaps another idea, if we think that waiting for resource loads to complete
is what all sleep()-ing scripts will do, is to transparently convert loads in
unload handlers into <a ping>-type actions, and then go ahead and kill the
handlers.

-- 
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