Bug 38276

Summary: [Chromium] callOnMainThread should equate to MessageLoop::PostTask
Product: WebKit Reporter: Darin Fisher (:fishd, Google) <fishd>
Component: PlatformAssignee: Darin Fisher (:fishd, Google) <fishd>
Status: RESOLVED FIXED    
Severity: Normal CC: dimich
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
v1 patch levin: review+, fishd: commit-queue-

Description Darin Fisher (:fishd, Google) 2010-04-28 11:21:26 PDT
[Chromium] callOnMainThread should equate to MessageLoop::PostTask

Presently, callOnMainThread is implemented using an intermediate queue, and MessageLoop::PostTask is used to process that queue in batches.  This adds ordering problems which cause flaky behavior in Chrome as callOnMainThread and MessageLoop::PostTask are not necessarily FIFO.  It is also a potential source of jank as while we are processing the queue, we do not let other tasks run on the thread.  It would be better to let the MessageLoop be the scheduler for all callbacks to the main thread.

Chromium bug is here:
http://code.google.com/p/chromium/issues/detail?id=42751

Chromium-side pre-req patch is here:
http://codereview.chromium.org/1794005/show
Comment 1 Darin Fisher (:fishd, Google) 2010-04-28 11:23:39 PDT
Created attachment 54591 [details]
v1 patch
Comment 2 Darin Fisher (:fishd, Google) 2010-04-28 13:36:15 PDT
Landed as http://trac.webkit.org/changeset/58425