[webkit-reviews] review requested: [Bug 18941] WebView fails to load if opened from a blocking JS call in a timer. : [Attachment 23576] Adds mask to fix recursive JS timer invocations in previous patch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 19 11:49:46 PDT 2008


Jeremy Moskovich <playmobil at google.com> has asked  for review:
Bug 18941: WebView fails to load if opened from a blocking JS call in a timer.
https://bugs.webkit.org/show_bug.cgi?id=18941

Attachment 23576: Adds mask to fix recursive JS timer invocations in previous
patch.
https://bugs.webkit.org/attachment.cgi?id=23576&action=edit

------- Additional Comments from Jeremy Moskovich <playmobil at google.com>
The previous patch had the problem that once fireTimersInNestedEventLoops() had
been called, JS timers where enabled along with all other timers causing a
situation in which JS timers could fire recursively.

Adding code to fireTimersInNestedEventLoops() to mask certain types of timers
isn't feasible because you have no way of knowing when to remove the mask.

This patch tags each timer with a type (currently just DOMTimers & generic
timers for everything else) and allows a timer to signify exclusion of other
timer types while it's firing.

If we encounter a fire that's excluded by the mask then we defer it to fire at
a later time.

This means that you can call fireTimersInNestedEventLoop() at any point without
worrying about the recursive behavior.


More information about the webkit-reviews mailing list