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

Unified Diff: src/objects-debug.cc

Issue 2536463002: Create JSPromise (Closed)
Patch Set: rebase 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.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index f47937557398aa0b2f14381b6761ab7db4bc99b1..be72b78269e5eeb1d3242a2f1aabd584d5e65872 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -104,7 +104,6 @@ void HeapObject::HeapObjectVerify() {
case JS_API_OBJECT_TYPE:
case JS_SPECIAL_API_OBJECT_TYPE:
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
- case JS_PROMISE_TYPE:
JSObject::cast(this)->JSObjectVerify();
break;
case JS_GENERATOR_OBJECT_TYPE:
@@ -205,6 +204,9 @@ void HeapObject::HeapObjectVerify() {
case JS_WEAK_SET_TYPE:
JSWeakSet::cast(this)->JSWeakSetVerify();
break;
+ case JS_PROMISE_TYPE:
+ JSPromise::cast(this)->JSPromiseVerify();
+ break;
case JS_REGEXP_TYPE:
JSRegExp::cast(this)->JSRegExpVerify();
break;
@@ -884,6 +886,19 @@ void JSWeakSet::JSWeakSetVerify() {
CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
}
+void JSPromise::JSPromiseVerify() {
+ CHECK(IsJSPromise());
+ JSObjectVerify();
+ Isolate* isolate = GetIsolate();
+ CHECK(result()->IsUndefined(isolate) || result()->IsObject());
+ CHECK(deferred()->IsUndefined(isolate) || deferred()->IsJSObject() ||
+ deferred()->IsFixedArray());
+ CHECK(fulfill_reactions()->IsUndefined(isolate) ||
+ fulfill_reactions()->IsCallable() ||
+ fulfill_reactions()->IsFixedArray());
+ CHECK(reject_reactions()->IsUndefined(isolate) ||
+ reject_reactions()->IsCallable() || reject_reactions()->IsFixedArray());
+}
void JSRegExp::JSRegExpVerify() {
JSObjectVerify();
@@ -1011,8 +1026,8 @@ void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() {
Isolate* isolate = GetIsolate();
CHECK(IsPromiseReactionJobInfo());
CHECK(value()->IsObject());
- CHECK(tasks()->IsJSArray() || tasks()->IsCallable());
- CHECK(deferred()->IsJSObject() || deferred()->IsUndefined(isolate));
+ CHECK(tasks()->IsFixedArray() || tasks()->IsCallable());
+ CHECK(deferred()->IsFixedArray() || deferred()->IsJSObject());
CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate));
CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate));
CHECK(context()->IsContext());
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698