Chromium Code Reviews

Unified Diff: src/promise.js

Issue 357603005: Introduce debug events for promises. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/promise.js
diff --git a/src/promise.js b/src/promise.js
index 710abadbeb8a0517c5e49dde9646b29361d3d843..5cd093f3555cfea479a6dfa1f3d7ef42f51a935e 100644
--- a/src/promise.js
+++ b/src/promise.js
@@ -38,6 +38,11 @@ var promiseRaw = GLOBAL_PRIVATE("Promise#raw");
if (!IS_SPEC_FUNCTION(resolver))
throw MakeTypeError('resolver_not_a_function', [resolver]);
var promise = PromiseInit(this);
+ if (DEBUG_IS_ACTIVE) {
+ %DebugPromiseEvent({ type : "new Promise",
+ promise: this,
aandrey 2014/06/29 12:16:00 this -> promise?
Yang 2014/06/30 11:11:59 Done.
+ resolver: resolver });
+ }
try {
%DebugPromiseHandlePrologue(function() { return promise });
resolver(function(x) { PromiseResolve(promise, x) },
« src/debug-debugger.js ('K') | « src/debug-debugger.js ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine