Bug 38276 - [Chromium] callOnMainThread should equate to MessageLoop::PostTask
Summary: [Chromium] callOnMainThread should equate to MessageLoop::PostTask
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Fisher (:fishd, Google)
Depends on:
Reported: 2010-04-28 11:21 PDT by Darin Fisher (:fishd, Google)
Modified: 2010-04-28 13:36 PDT (History)
1 user (show)

See Also:

v1 patch (5.71 KB, patch)
2010-04-28 11:23 PDT, Darin Fisher (:fishd, Google)
levin: review+
fishd: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:

Chromium-side pre-req patch is here:
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