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

Unified Diff: src/mirror-debugger.js

Issue 258823012: Expose promise value through promise mirror. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | test/mjsunit/es6/mirror-promises.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mirror-debugger.js
diff --git a/src/mirror-debugger.js b/src/mirror-debugger.js
index 9cde02b8bc75f3e97ade2e92a2843346b0114d7d..26ed909dfdedcfc3818c5a01fc44977b46cddc3c 100644
--- a/src/mirror-debugger.js
+++ b/src/mirror-debugger.js
@@ -1216,6 +1216,11 @@ PromiseMirror.prototype.status = function() {
};
+PromiseMirror.prototype.promiseValue = function() {
+ return %GetPromiseValue(this.value_);
+};
+
+
/**
* Base mirror object for properties.
* @param {ObjectMirror} mirror The mirror object having this property
@@ -2533,6 +2538,7 @@ JSONProtocolSerializer.prototype.serializeObject_ = function(mirror, content,
if (mirror.isPromise()) {
// Add promise specific properties.
content.status = mirror.status();
+ content.promiseValue = mirror.promiseValue();
}
// Add actual properties - named properties followed by indexed properties.
« no previous file with comments | « no previous file | test/mjsunit/es6/mirror-promises.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698