Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index 36c3af75e816892b329a9569a8a04d3e37947664..2594195c43bf4a85de8adf5242e9606d7630586f 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -146,7 +146,7 @@ function FulfillPromise(promise, status, value, promiseQueue) { |
var tasks = GET_PRIVATE(promise, promiseQueue); |
if (!IS_UNDEFINED(tasks)) { |
var deferred = GET_PRIVATE(promise, promiseDeferredReactionSymbol); |
- PromiseEnqueue(value, tasks, deferred, status); |
+ %EnqueuePromiseReactionJob(value, tasks, deferred, status); |
} |
PromiseSet(promise, status, value); |
} |
@@ -176,7 +176,7 @@ function PromiseHandle(value, handler, deferred) { |
} |
} |
-function PromiseEnqueue(value, tasks, deferreds, status) { |
+function PromiseDebugGetInfo(deferreds, status) { |
var id, name, instrumenting = DEBUG_IS_ACTIVE; |
if (instrumenting) { |
@@ -199,7 +199,7 @@ function PromiseEnqueue(value, tasks, deferreds, status) { |
%DebugAsyncTaskEvent("enqueue", id, name); |
} |
} |
- %EnqueuePromiseReactionJob(value, tasks, deferreds, id, name); |
+ return [id, name]; |
} |
function PromiseAttachCallbacks(promise, deferred, onResolve, onReject) { |
@@ -388,8 +388,8 @@ function PerformPromiseThen(promise, onResolve, onReject, resultCapability) { |
PromiseAttachCallbacks(promise, resultCapability, onResolve, onReject); |
break; |
case kFulfilled: |
- PromiseEnqueue(GET_PRIVATE(promise, promiseResultSymbol), |
- onResolve, resultCapability, kFulfilled); |
+ %EnqueuePromiseReactionJob(GET_PRIVATE(promise, promiseResultSymbol), |
+ onResolve, resultCapability, kFulfilled); |
break; |
case kRejected: |
if (!HAS_DEFINED_PRIVATE(promise, promiseHasHandlerSymbol)) { |
@@ -397,8 +397,8 @@ function PerformPromiseThen(promise, onResolve, onReject, resultCapability) { |
// Revoke previously triggered reject event. |
%PromiseRevokeReject(promise); |
} |
- PromiseEnqueue(GET_PRIVATE(promise, promiseResultSymbol), |
- onReject, resultCapability, kRejected); |
+ %EnqueuePromiseReactionJob(GET_PRIVATE(promise, promiseResultSymbol), |
+ onReject, resultCapability, kRejected); |
break; |
} |
@@ -657,7 +657,8 @@ utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [ |
"promise_reject", DoRejectPromise, |
"promise_resolve", ResolvePromise, |
"promise_then", PromiseThen, |
- "promise_handle", PromiseHandle |
+ "promise_handle", PromiseHandle, |
+ "promise_debug_get_info", PromiseDebugGetInfo |
]); |
// This allows extras to create promises quickly without building extra |