Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index a666080e78654b0474a48badc009058a416ab39c..463fc25e00effc521f1a212f56e6b00d19d4022d 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -12,6 +12,7 @@ |
// Imports |
var InternalArray = utils.InternalArray; |
+var MicrotaskEnq; |
var promiseCombinedDeferredSymbol = |
utils.ImportNow("promise_combined_deferred_symbol"); |
var promiseHasHandlerSymbol = |
@@ -31,6 +32,7 @@ var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); |
utils.Import(function(from) { |
SpeciesConstructor = from.SpeciesConstructor; |
+ MicrotaskEnq = from.MicrotaskEnq; |
}); |
// ------------------------------------------------------------------- |
@@ -166,7 +168,7 @@ function PromiseHandle(value, handler, deferred) { |
function PromiseEnqueue(value, tasks, deferreds, status) { |
var id, name, instrumenting = DEBUG_IS_ACTIVE; |
- %EnqueueMicrotask(function() { |
+ MicrotaskEnq(function() { |
if (instrumenting) { |
%DebugAsyncTaskEvent({ type: "willHandle", id: id, name: name }); |
} |
@@ -279,7 +281,7 @@ function ResolvePromise(promise, resolution) { |
var id; |
var name = "PromiseResolveThenableJob"; |
var instrumenting = DEBUG_IS_ACTIVE; |
- %EnqueueMicrotask(function() { |
+ MicrotaskEnq(function() { |
if (instrumenting) { |
%DebugAsyncTaskEvent({ type: "willHandle", id: id, name: name }); |
} |