Reviewers: dcarney,
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
Please review this at https://codereview.chromium.org/290633010/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+76, -110 lines):
M src/api.cc
M src/bootstrapper.cc
M src/contexts.h
M src/execution.h
M src/execution.cc
M src/heap.h
M src/heap.cc
M src/isolate.h
M src/isolate.cc
M src/object-observe.js
M src/promise.js
M src/runtime.h
M src/runtime.cc
M src/v8natives.js
M test/cctest/test-api.cc
D test/mjsunit/runtime-gen/getmicrotaskstate.js
D test/mjsunit/runtime-gen/setmicrotaskpending.js
M tools/generate-runtime-tests.py
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.