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

Issue 154283002: V8 Microtask Queue & API (Closed)

Created:
6 years, 10 months ago by rafaelw
Modified:
6 years, 10 months ago
CC:
v8-dev, Paweł Hajdan Jr., adamk
Visibility:
Public.

Description

V8 Microtask Queue & API This patch generalizes Object.observe callbacks and promise resolution into a FIFO queue called a "microtask queue". It also exposes new V8 API which exposes the microtask queue to the embedder. In particular, it allows the embedder to -schedule a microtask (EnqueueExternalMicrotask) -run the microtask queue (RunMicrotasks) -control whether the microtask queue is run automatically within V8 when the last script exits (SetAutorunMicrotasks). R=dcarney@chromium.org, rossberg@chromium.org, dcarney, rossberg, svenpanne BUG= Committed: https://code.google.com/p/v8/source/detail?r=19344

Patch Set 1 #

Patch Set 2 : pre-review #

Patch Set 3 : pre-review #

Total comments: 8

Patch Set 4 : merge microtask queue into this patch #

Patch Set 5 : ExternalMicrotaskCallback #

Patch Set 6 : cleanup #

Total comments: 6

Patch Set 7 : cr comments #

Total comments: 2

Patch Set 8 : one last thing #

Patch Set 9 : heapconst #

Unified diffs Side-by-side diffs Delta from patch set Stats (+730 lines, -188 lines) Patch
M include/v8.h View 1 2 3 4 5 6 2 chunks +17 lines, -1 line 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M src/contexts.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/execution.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M src/execution.cc View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M src/heap.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M src/heap.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M src/isolate.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M src/object-observe.js View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M src/promise.js View 1 2 3 4 5 1 chunk +18 lines, -26 lines 0 comments Download
M src/runtime.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
M src/v8.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M src/v8.cc View 1 2 3 4 5 6 7 2 chunks +19 lines, -3 lines 0 comments Download
M src/v8natives.js View 1 2 3 4 5 1 chunk +22 lines, -2 lines 0 comments Download
M test/cctest/cctest.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 7 1 chunk +96 lines, -0 lines 0 comments Download
A test/cctest/test-microtask-delivery.cc View 1 2 3 1 chunk +137 lines, -0 lines 0 comments Download
M test/mjsunit/fuzz-natives-part3.js View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
A test/mjsunit/harmony/microtask-delivery.js View 1 2 3 1 chunk +168 lines, -0 lines 0 comments Download
M tools/v8heapconst.py View 1 2 3 4 5 6 7 8 3 chunks +171 lines, -150 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
rafaelw
6 years, 10 months ago (2014-02-04 22:20:50 UTC) #1
rossberg
Adding Dan and Sven as reviewers, who are more familiar with V8 API pitfalls.
6 years, 10 months ago (2014-02-10 14:02:06 UTC) #2
rossberg
Seems GTM. This just exposes the current per-context queue, right? Do you still plan to ...
6 years, 10 months ago (2014-02-10 14:09:00 UTC) #3
Sven Panne
A few API-related DBCs... https://codereview.chromium.org/154283002/diff/20001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/154283002/diff/20001/include/v8.h#newcode3862 include/v8.h:3862: typedef void (*MicrotaskCallback)(); We should ...
6 years, 10 months ago (2014-02-10 14:22:02 UTC) #4
dcarney
We are trying to remove api callbacks that are not v8::Functions when the callbacks is ...
6 years, 10 months ago (2014-02-10 16:45:33 UTC) #5
rafaelw
Ok. All done and ready for review again. Note that this patch now has https://codereview.chromium.org/131413008/ ...
6 years, 10 months ago (2014-02-11 00:28:51 UTC) #6
dcarney
https://codereview.chromium.org/154283002/diff/180001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/154283002/diff/180001/include/v8.h#newcode5421 include/v8.h:5421: static const int kEmptyStringRootIndex = 148; did you run ...
6 years, 10 months ago (2014-02-11 07:47:12 UTC) #7
Yang
On 2014/02/11 07:47:12, dcarney wrote: > https://codereview.chromium.org/154283002/diff/180001/include/v8.h > File include/v8.h (right): > > https://codereview.chromium.org/154283002/diff/180001/include/v8.h#newcode5421 > ...
6 years, 10 months ago (2014-02-11 08:06:03 UTC) #8
rafaelw
https://codereview.chromium.org/154283002/diff/180001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/154283002/diff/180001/include/v8.h#newcode5421 include/v8.h:5421: static const int kEmptyStringRootIndex = 148; I didn't, but ...
6 years, 10 months ago (2014-02-11 20:37:43 UTC) #9
dcarney
lgtm, small nit https://codereview.chromium.org/154283002/diff/180001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/154283002/diff/180001/include/v8.h#newcode5421 include/v8.h:5421: static const int kEmptyStringRootIndex = 148; ...
6 years, 10 months ago (2014-02-12 07:17:14 UTC) #10
rossberg
lgtm
6 years, 10 months ago (2014-02-12 10:51:39 UTC) #11
rafaelw
Thanks for your help, everyone. https://codereview.chromium.org/154283002/diff/180001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/154283002/diff/180001/include/v8.h#newcode5421 include/v8.h:5421: static const int kEmptyStringRootIndex ...
6 years, 10 months ago (2014-02-12 21:25:03 UTC) #12
rafaelw
6 years, 10 months ago (2014-02-12 22:04:31 UTC) #13
Message was sent while issue was closed.
Committed patchset #9 manually as r19344 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698