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

Unified Diff: test/promises-aplus/lib/global.js

Issue 1246933002: Remove unnecessary coupling between Promise tests and Object.observe (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use %EnqueueMicrotask Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/promises.js ('k') | test/promises-aplus/lib/mocha.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/promises-aplus/lib/global.js
diff --git a/test/promises-aplus/lib/global.js b/test/promises-aplus/lib/global.js
index 1466d2063b5be2351b49a021578cd1091992fbee..ece338ed3e24779d322d9ad2ae39a895f9aae81d 100644
--- a/test/promises-aplus/lib/global.js
+++ b/test/promises-aplus/lib/global.js
@@ -33,15 +33,6 @@ var clearTimeout;
var timers = {};
var currentId = 0;
-function PostMicrotask(fn) {
- var o = {};
- Object.observe(o, function() {
- fn();
- });
- // Change something to enqueue a microtask.
- o.x = 'hello';
-}
-
setInterval = function(fn, delay) {
var i = 0;
var id = currentId++;
@@ -52,9 +43,9 @@ setInterval = function(fn, delay) {
if (i++ >= delay) {
fn();
}
- PostMicrotask(loop);
+ %EnqueueMicrotask(loop);
}
- PostMicrotask(loop);
+ %EnqueueMicrotask(loop);
timers[id] = true;
return id;
}
« no previous file with comments | « test/mjsunit/es6/promises.js ('k') | test/promises-aplus/lib/mocha.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698