Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Issue 303693005: Simplify Blink <-> V8 Microtask queue running protocol (Closed)

Created:
6 years, 7 months ago by adamk
Modified:
6 years, 6 months ago
CC:
blink-reviews, arv+blink, sof, eae+blinkwatch, abarth-chromium, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, rwlbuis, yhirano, rafaelw, dcarney
Visibility:
Public.

Description

Simplify Blink <-> V8 Microtask queue running protocol V8 now implements Isolate::RunMicrotasks() in C++, which means its callers no longer need to enter V8 Context::Scope before calling it. This simplifies WebCore::Microtask::performCheckpoint, and gets us one step closer to ditching V8PerIsolateData::ensureDomInJSContext(). This patch also gets rid of most of the microtask-related logic in ScriptPromiseResolverWithContext, allowing WebCore::Microtask::performCheckpoint to be the only code in Blink that calls Isolate::RunMicrotasks(). Instead of triggering microtask delivery directly, or via the RunMicrotasksTask, ScriptPromiseResolverWithContext now utilizes V8RecursionScope to "simulate" a JavaScript stack (from Blink's point of view). In workers, this will result in a RunMicrotasks() call when the V8RecursionScope is destructed. There are still two FIXMEs: - The V8RecursionScope discussed above would be unnecessary if there were a WebThread::TaskObserver on worker threads to handle microtask-running at the end of each task. - ensureDomInJSContext() is still needed in order to instantiate the v8::Functions that are passed into Isolate::EnqueueMicrotask(). Fixing this will require more work on the V8 side to allow passing in a C++ callback directly. BUG=374772 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174987

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -59 lines) Patch
M Source/bindings/v8/ScriptPromiseResolverWithContext.h View 1 chunk +1 line, -6 lines 0 comments Download
M Source/bindings/v8/ScriptPromiseResolverWithContext.cpp View 2 chunks +12 lines, -44 lines 0 comments Download
M Source/bindings/v8/V8PerIsolateData.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Microtask.cpp View 1 chunk +1 line, -8 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
adamk
6 years, 7 months ago (2014-05-27 23:55:59 UTC) #1
adamk
The failure in fast/css/fontface-methods.html is "real", in that it fails with this patch applied and ...
6 years, 7 months ago (2014-05-28 01:50:18 UTC) #2
Kunihiko Sakamoto
On 2014/05/28 01:50:18, adamk wrote: > The failure in fast/css/fontface-methods.html is "real", in that it ...
6 years, 6 months ago (2014-05-28 06:25:39 UTC) #3
jochen (gone - plz use gerrit)
it's not that surprising, as this CL changes the ordering when the promise tasks are ...
6 years, 6 months ago (2014-05-28 12:18:43 UTC) #4
adamk
The CQ bit was checked by adamk@chromium.org
6 years, 6 months ago (2014-05-28 18:18:48 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/303693005/1
6 years, 6 months ago (2014-05-28 18:19:08 UTC) #6
adamk
On 2014/05/28 06:25:39, Kunihiko Sakamoto wrote: > On 2014/05/28 01:50:18, adamk wrote: > > The ...
6 years, 6 months ago (2014-05-28 18:19:18 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-05-28 19:37:31 UTC) #8
Message was sent while issue was closed.
Change committed as 174987

Powered by Google App Engine
This is Rietveld 408576698