Reviewers: rossberg,
https://codereview.chromium.org/131413008/diff/30001/src/v8natives.js
File src/v8natives.js (right):
https://codereview.chromium.org/131413008/diff/30001/src/v8natives.js#newcode1912
src/v8natives.js:1912: RunMicrotasks.queue = new InternalArray;
I'm tempted to avoid allocating a new InternalArray for every pass here,
and instead just set queue.length = 0 at the end of the function.
I guess you'd need to protect against overflow within a single pass.
What do you think?
https://codereview.chromium.org/131413008/diff/30001/test/mjsunit/harmony/microtask-delivery.js
File test/mjsunit/harmony/microtask-delivery.js (right):
https://codereview.chromium.org/131413008/diff/30001/test/mjsunit/harmony/microtask-delivery.js#newcode98
test/mjsunit/harmony/microtask-delivery.js:98: assertOrdering(['p1',
'p2', 'p1:1', 'p2:1']);
This patch isn't changing this ordering (I checked). This test would
have passed before this patch.
However, in talking with Alex Russel, I got the impression that Promises
are supposed to "fast-forward" to the next "then" which is a promise.
In other words, I was expecting this to be 'p1', 'p1:1', 'p2', 'p2:2'.
Description:
Implement Microtask Delivery Queue
R=rossberg
BUG=
Please review this at https://codereview.chromium.org/131413008/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+308, -30 lines):
M src/object-observe.js
M src/promise.js
M src/runtime.h
M src/runtime.cc
M src/v8natives.js
M test/cctest/cctest.gyp
A test/cctest/test-microtask-delivery.cc
A test/mjsunit/harmony/microtask-delivery.js
--
--
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/groups/opt_out.