Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 3c669403132bc99f743e16f7e8d3080613a8e432..c1955cfdf7b71eb41e11af3e312992e0305922f1 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -1898,10 +1898,15 @@ SetUpFunction(); |
// Eventually, we should move to a real event queue that allows to maintain |
// relative ordering of different kinds of tasks. |
-RunMicrotasks.runners = new InternalArray; |
+RunMicrotasks.queue = new InternalArray; |
function RunMicrotasks() { |
while (%SetMicrotaskPending(false)) { |
- for (var i in RunMicrotasks.runners) RunMicrotasks.runners[i](); |
+ var microtasks = RunMicrotasks.queue; |
+ RunMicrotasks.queue = new InternalArray; |
+ |
+ for (var i = 0; i < microtasks.length; i++) { |
+ microtasks[i](); |
+ } |
} |
} |