Bug 141820

Summary: RunLoop::dispatch() should drop the mutex before calling wakeUp().
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: WebKit Misc.Assignee: Simon Fraser (smfr) <simon.fraser>
Severity: Normal CC: andersca, benjamin, cmarcelo, commit-queue, sam, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch none

Description Simon Fraser (smfr) 2015-02-19 18:03:24 PST
It's possible for RunLoop::performWork() to return without handling all the functions in the queue. In that case, CF is going to unset the CFRunLoopSource "signaled" state, which means that source won't get processed again until RunLoop::dispatch is called.

We should re-signal the source at the end of RunLoop::performWork() if there's still work to do. This is OK, because CF unsets the signaled bit before it calls us.

Also, RunLoop::dispatch() should drop the mutex before calling wakeUp().
Comment 1 Simon Fraser (smfr) 2015-02-19 18:28:34 PST
Never mind. If something was added to the m_functionQueue inside of RunLoop::performWork(), it would have had to have been via RunLoop::dispatch, which would have signaled.

So I'll just keep this for the mutex fix.
Comment 2 Simon Fraser (smfr) 2015-02-19 18:32:31 PST
Created attachment 246931 [details]
Comment 3 WebKit Commit Bot 2015-02-20 11:36:13 PST
Comment on attachment 246931 [details]

Clearing flags on attachment: 246931

Committed r180434: <http://trac.webkit.org/changeset/180434>
Comment 4 WebKit Commit Bot 2015-02-20 11:36:18 PST
All reviewed patches have been landed.  Closing bug.