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

Unified Diff: src/objects-printer.cc

Issue 2554943002: Reland Create JSPromise (patchset #16 id:300001 of https://codereview.chromium.org/2536463002/ )" (Closed)
Patch Set: fix test Created 4 years 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 | « src/objects-inl.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index a11b072377d0b941d57e934a8f4476d7874dbfba..f8f927c08de6e01d90238a8bafb66557a00767e3 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -150,11 +150,13 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
case JS_SPECIAL_API_OBJECT_TYPE:
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
case JS_GENERATOR_OBJECT_TYPE:
- case JS_PROMISE_TYPE:
case JS_ARGUMENTS_TYPE:
case JS_ERROR_TYPE:
JSObject::cast(this)->JSObjectPrint(os);
break;
+ case JS_PROMISE_TYPE:
+ JSPromise::cast(this)->JSPromisePrint(os);
+ break;
case JS_ARRAY_TYPE:
JSArray::cast(this)->JSArrayPrint(os);
break;
@@ -542,6 +544,14 @@ void JSArray::JSArrayPrint(std::ostream& os) { // NOLINT
JSObjectPrintBody(os, this);
}
+void JSPromise::JSPromisePrint(std::ostream& os) { // NOLINT
+ JSObjectPrintHeader(os, this, "JSPromise");
+ os << "\n - status = " << JSPromise::Status(status());
+ os << "\n - result = " << Brief(result());
+ os << "\n - deferreds = " << Brief(deferred());
+ os << "\n - fulfill_reactions = " << Brief(fulfill_reactions());
+ os << "\n - reject_reactions = " << Brief(reject_reactions());
+}
void JSRegExp::JSRegExpPrint(std::ostream& os) { // NOLINT
JSObjectPrintHeader(os, this, "JSRegExp");
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698