[webkit-reviews] review requested: [Bug 89673] showModalDialog fix creates risk of never returning from RunLoop::performWork, potentially blocking other event sources : [Attachment 148832] Patch v1 - Proposed fix
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 21 10:36:38 PDT 2012
Brady Eidson <beidson at apple.com> has asked for review:
Bug 89673: showModalDialog fix creates risk of never returning from
RunLoop::performWork, potentially blocking other event sources
https://bugs.webkit.org/show_bug.cgi?id=89673
Attachment 148832: Patch v1 - Proposed fix
https://bugs.webkit.org/attachment.cgi?id=148832&action=review
------- Additional Comments from Brady Eidson <beidson at apple.com>
This patch implements a rule where we only perform the number of functions in
the queue at the time performWork was called. Additional functions will wait
until the next time performWork is called.
This very closely approximates our behavior before
http://trac.webkit.org/changeset/120879.
I originally re-wrote the loop to be a for loop but that required acquiring the
lock before the for loop *just* to get the function count.
By far the common case in RunLoop::performWork is that it is handling 1
function. So the for-loop solution would've required acquiring and releasing
the lock twice just to perform one function.
Having this simple branch inside the loop seems much more efficient than having
that addition lock acquisition in the common case of 1 function, but I'm open
to input on this.
More information about the webkit-reviews
mailing list