Index: test/mjsunit/es6/promises.js |
diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js |
index 63b6d2f94a9a7ec0799a7ef766845675dc8466fb..19239b601bc74e10c22565cdcfc8f16687759fdf 100644 |
--- a/test/mjsunit/es6/promises.js |
+++ b/test/mjsunit/es6/promises.js |
@@ -29,7 +29,6 @@ |
// Make sure we don't rely on functions patchable by monkeys. |
var call = Function.prototype.call.call.bind(Function.prototype.call) |
-var observe = Object.observe; |
var getOwnPropertyNames = Object.getOwnPropertyNames; |
var defineProperty = Object.defineProperty; |
var numberPrototype = Number.prototype; |
@@ -87,19 +86,15 @@ function assertAsync(b, s) { |
} |
function assertAsyncDone(iteration) { |
- var iteration = iteration || 0 |
- var dummy = {} |
- observe(dummy, |
- function() { |
- if (asyncAssertsExpected === 0) |
- assertAsync(true, "all") |
- else if (iteration > 10) // Shouldn't take more. |
- assertAsync(false, "all") |
- else |
- assertAsyncDone(iteration + 1) |
- } |
- ) |
- dummy.dummy = dummy |
+ var iteration = iteration || 0; |
+ %EnqueueMicrotask(function() { |
+ if (asyncAssertsExpected === 0) |
+ assertAsync(true, "all") |
+ else if (iteration > 10) // Shouldn't take more. |
+ assertAsync(false, "all") |
+ else |
+ assertAsyncDone(iteration + 1) |
+ }); |
} |