[Webkit-unassigned] [Bug 48077] HTMLParserScheduler should be suspended when page loading is deferred

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 1 06:33:07 PDT 2010


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





--- Comment #18 from Joe Mason <jmason at rim.com>  2010-11-01 06:33:06 PST ---
(In reply to comment #15)
> I don't understand what this patch is trying to do.  I don't really understand what PageGroupLoadDeferrer is.  I guess if I had understood these things this "bug" wouldn't have existed.
> 
> Can you explain again what you're trying to fix here?

PageGroupLoadDeferrer prevents reentrance into the parser (and thus the JS interpreter).  When a PageGroupLoadDeferrer exists, all incoming network data intended for a given page group is buffered and not forwarded to the parser until the PageGroupLoadDeferrer goes out of scope.  (I'm not sure why this is done on the page group level rather than per-page.)  Also, timers that have already been set which trigger parsing should not fire until the PageGroupLoadDeferrer goes out of scope.

The simplest use case is when a JS alert box is up - the JS function is synchronous, so the interpreter is paused on the alert call, but the app message pump needs to keep running to update the UI.  During this time we need to block further parsing since sync JS is "running" even though the interpreter won't actually be active again until the user hits OK.  So, Chrome::runJavaScriptAlert creates a PageGroupLoadDeferrer to avoid parsing any data that comes in while the function is running.

The problem in this bug is that when a PageLoadDeferrer object exists, in some cases the m_parserScheduler timer can still fire, which will restart the parser.

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