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

Issue 290633010: Move microtask queueing logic from JavaScript to C++ (Closed)

Created:
6 years, 7 months ago by adamk
Modified:
6 years, 7 months ago
Reviewers:
dcarney
CC:
v8-dev, rossberg, rafaelw
Visibility:
Public.

Description

Move microtask queueing logic from JavaScript to C++ This avoids the appearence of a leak due to storing a JSObject as the microtask_state in the strong root list, and allows callers to call Isolate::RunMicrotasks() without having any v8::Context available (as at least Blink has interest in doing). The queue is now a strong root, represented as a FixedArray of JSFunctions (or empty_fixed_array, if it's empty); it doubles in size when it needs to grow. The number of elements in the queue is stored in Isolate::pending_microtask_count(). LOG=Y R=dcarney@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=21356

Patch Set 1 #

Total comments: 8

Patch Set 2 : Handle comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -110 lines) Patch
M src/api.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M src/bootstrapper.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M src/contexts.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/execution.h View 1 chunk +0 lines, -3 lines 0 comments Download
M src/execution.cc View 1 chunk +0 lines, -22 lines 0 comments Download
M src/heap.h View 1 chunk +1 line, -1 line 0 comments Download
M src/heap.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/isolate.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/isolate.cc View 1 2 chunks +37 lines, -6 lines 0 comments Download
M src/object-observe.js View 1 chunk +2 lines, -2 lines 0 comments Download
M src/promise.js View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.h View 2 chunks +1 line, -4 lines 0 comments Download
M src/runtime.cc View 1 chunk +6 lines, -14 lines 0 comments Download
M src/v8natives.js View 1 chunk +0 lines, -31 lines 0 comments Download
M test/cctest/test-api.cc View 1 chunk +19 lines, -0 lines 0 comments Download
D test/mjsunit/runtime-gen/getmicrotaskstate.js View 1 chunk +0 lines, -4 lines 0 comments Download
D test/mjsunit/runtime-gen/setmicrotaskpending.js View 1 chunk +0 lines, -5 lines 0 comments Download
M tools/generate-runtime-tests.py View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
adamk
6 years, 7 months ago (2014-05-16 17:33:42 UTC) #1
dcarney
lgtm, nits https://codereview.chromium.org/290633010/diff/1/src/heap.h File src/heap.h (right): https://codereview.chromium.org/290633010/diff/1/src/heap.h#newcode186 src/heap.h:186: V(JSObject, observation_state, ObservationState) \ unrelated, but is ...
6 years, 7 months ago (2014-05-16 17:41:50 UTC) #2
dcarney
https://codereview.chromium.org/290633010/diff/1/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/290633010/diff/1/src/isolate.cc#newcode2254 src/isolate.cc:2254: queue = factory()->NewFixedArray(1); 1 might be a little conservative ...
6 years, 7 months ago (2014-05-17 06:54:09 UTC) #3
Yang
On 2014/05/17 06:54:09, dcarney wrote: > https://codereview.chromium.org/290633010/diff/1/src/isolate.cc > File src/isolate.cc (right): > > https://codereview.chromium.org/290633010/diff/1/src/isolate.cc#newcode2254 > ...
6 years, 7 months ago (2014-05-17 12:57:19 UTC) #4
adamk
https://codereview.chromium.org/290633010/diff/1/src/heap.h File src/heap.h (right): https://codereview.chromium.org/290633010/diff/1/src/heap.h#newcode186 src/heap.h:186: V(JSObject, observation_state, ObservationState) \ On 2014/05/16 17:41:51, dcarney wrote: ...
6 years, 7 months ago (2014-05-19 07:47:57 UTC) #5
adamk
6 years, 7 months ago (2014-05-19 07:57:25 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r21356 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698