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

Unified Diff: src/debug-debugger.js

Issue 393283007: Introduce more debug events for promises. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Check result length in the test as well 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
« no previous file with comments | « no previous file | src/promise.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-debugger.js
diff --git a/src/debug-debugger.js b/src/debug-debugger.js
index 3a35c98427506fe2bf8b0f980aeca566338b9a44..78f3396a3da141754eddd76def962b5dd2249ab5 100644
--- a/src/debug-debugger.js
+++ b/src/debug-debugger.js
@@ -1202,9 +1202,15 @@ function MakeScriptObject_(script, include_source) {
function MakePromiseEvent(event_data) {
- if (event_data.type = "new Promise") {
+ if (event_data.type == "new") {
return new NewPromiseEvent(event_data);
}
+ if (event_data.type == "update") {
+ return new UpdatePromiseStatusEvent(event_data);
+ }
+ if (event_data.type == "chain") {
+ return new UpdatePromiseParentEvent(event_data);
+ }
}
@@ -1227,6 +1233,40 @@ NewPromiseEvent.prototype.resolver = function() {
}
+function UpdatePromiseStatusEvent(event_data) {
+ this.promise_ = event_data.promise;
+ this.status_ = event_data.status;
+ this.value_ = event_data.value;
+}
+
+
+UpdatePromiseStatusEvent.prototype.promise = PromiseGetter;
+
+
+UpdatePromiseStatusEvent.prototype.status = function() {
+ return this.status_;
+}
+
+
+UpdatePromiseStatusEvent.prototype.value = function() {
+ return MakeMirror(this.value_);
+}
+
+
+function UpdatePromiseParentEvent(event_data) {
+ this.promise_ = event_data.promise;
+ this.parentPromise_ = event_data.parentPromise;
+}
+
+
+UpdatePromiseParentEvent.prototype.promise = PromiseGetter;
+
+
+UpdatePromiseParentEvent.prototype.parentPromise = function() {
+ return MakeMirror(this.parentPromise_);
+}
+
+
function MakeAsyncTaskEvent(event_data) {
return new AsyncTaskEvent(event_data);
}
« no previous file with comments | « no previous file | src/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698