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

Unified Diff: src/promise.js

Issue 416213004: Merge three PromiseEvent's into one. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix formatting Created 6 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
Index: src/promise.js
diff --git a/src/promise.js b/src/promise.js
index 09582a279758b1ba43fb4991c567cc784ca5a211..47262eb29a5da5bc8944c500937ea42bb9044204 100644
--- a/src/promise.js
+++ b/src/promise.js
@@ -39,11 +39,6 @@ var lastMicrotaskId = 0;
if (!IS_SPEC_FUNCTION(resolver))
throw MakeTypeError('resolver_not_a_function', [resolver]);
var promise = PromiseInit(this);
- if (DEBUG_IS_ACTIVE) {
- %DebugPromiseEvent({ type : "new",
- promise: this,
- resolver: resolver });
- }
try {
%DebugPromiseHandlePrologue(function() { return promise });
resolver(function(x) { PromiseResolve(promise, x) },
@@ -62,9 +57,8 @@ var lastMicrotaskId = 0;
SET_PRIVATE(promise, promiseValue, value);
SET_PRIVATE(promise, promiseOnResolve, onResolve);
SET_PRIVATE(promise, promiseOnReject, onReject);
- if (DEBUG_IS_ACTIVE && status !== 0) {
- %DebugPromiseEvent({ type: "update",
- promise: promise,
+ if (DEBUG_IS_ACTIVE) {
+ %DebugPromiseEvent({ promise: promise,
aandrey 2014/08/01 13:22:21 nit: can it be a one liner now?
Alexandra Mikhaylova 2014/08/01 13:44:53 Thanks! Fixed it.
status: status,
value: value });
}
@@ -241,8 +235,7 @@ var lastMicrotaskId = 0;
break;
}
if (DEBUG_IS_ACTIVE) {
- %DebugPromiseEvent({ type: "chain",
- promise: deferred.promise,
+ %DebugPromiseEvent({ promise: deferred.promise,
aandrey 2014/08/01 13:22:21 ditto
Alexandra Mikhaylova 2014/08/01 13:44:52 Done.
parentPromise: this });
}
return deferred.promise;

Powered by Google App Engine
This is Rietveld 408576698