Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index 0cde9320e2c2da25395a7f9d3b19401603625a51..dc6d8bf534287f7219f5f91a24965852eab70515 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -48,12 +48,6 @@ const kPending = 0; |
const kFulfilled = +1; |
const kRejected = -1; |
-var lastMicrotaskId = 0; |
- |
-function PromiseNextMicrotaskID() { |
- return ++lastMicrotaskId; |
-} |
- |
// ES#sec-createresolvingfunctions |
// CreateResolvingFunctions ( promise ) |
function CreateResolvingFunctions(promise, debugEvent) { |
@@ -202,7 +196,7 @@ function PromiseEnqueue(value, tasks, deferreds, status) { |
promiseAsyncStackIDSymbol); |
name = "async function"; |
} else { |
- id = PromiseNextMicrotaskID(); |
+ id = %DebugNextMicrotaskId(); |
name = status === kFulfilled ? "Promise.resolve" : "Promise.reject"; |
%DebugAsyncTaskEvent("enqueue", id, name); |
} |
@@ -307,7 +301,7 @@ function ResolvePromise(promise, resolution) { |
// Mark the dependency of the new promise on the resolution |
SET_PRIVATE(resolution, promiseHandledBySymbol, promise); |
} |
- id = PromiseNextMicrotaskID(); |
+ id = %DebugNextMicrotaskId(); |
name = "PromiseResolveThenableJob"; |
%DebugAsyncTaskEvent("enqueue", id, name); |
} |
@@ -687,7 +681,6 @@ utils.Export(function(to) { |
to.IsPromise = IsPromise; |
to.PromiseCreate = PromiseCreate; |
to.PromiseThen = PromiseThen; |
- to.PromiseNextMicrotaskID = PromiseNextMicrotaskID; |
to.GlobalPromise = GlobalPromise; |
to.NewPromiseCapability = NewPromiseCapability; |