Chromium Code Reviews

Unified Diff: src/promise.js

Issue 257803005: Expose promise status 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.
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 f77fc5c197b982c19fea7253e1e7632d319e1d78..b87f9d65f93e8420a51257b36b80355354e1a938 100644
--- a/src/promise.js
+++ b/src/promise.js
@@ -338,3 +338,20 @@ function SetUpPromise() {
}
SetUpPromise();
+
+// Functions to expose promise details to the debugger.
+function GetPromiseStatus(promise) {
+ return GET_PRIVATE(promise, promiseStatus);
+}
+
+function GetPromiseOnResolve(promise) {
+ return GET_PRIVATE(promise, promiseOnResolve);
+}
+
+function GetPromiseOnReject(promise) {
+ return GET_PRIVATE(promise, promiseOnReject);
+}
+
+function GetPromiseValue(promise) {
+ return GET_PRIVATE(promise, promiseValue);
+}

Powered by Google App Engine