Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 44cab53cc7ae90696e7c34929084e0e6e1e318bd..bbafa12679cdea1927dedad691bc48079a3c5332 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -139,6 +139,9 @@ void HeapObject::HeapObjectVerify() { |
case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
JSObject::cast(this)->JSObjectVerify(); |
break; |
+ case JS_GENERATOR_OBJECT_TYPE: |
+ JSGeneratorObject::cast(this)->JSGeneratorObjectVerify(); |
+ break; |
case JS_MODULE_TYPE: |
JSModule::cast(this)->JSModuleVerify(); |
break; |
@@ -404,6 +407,17 @@ void FixedDoubleArray::FixedDoubleArrayVerify() { |
} |
+void JSGeneratorObject::JSGeneratorObjectVerify() { |
+ // In an expression like "new g()", there can be a point where a generator |
+ // object is allocated but its fields are all undefined, as it hasn't yet been |
+ // initialized by the generator. Hence these weak checks. |
+ VerifyObjectField(kFunctionOffset); |
+ VerifyObjectField(kContextOffset); |
+ VerifyObjectField(kOperandStackOffset); |
+ VerifyObjectField(kContinuationOffset); |
+} |
+ |
+ |
void JSModule::JSModuleVerify() { |
VerifyObjectField(kContextOffset); |
VerifyObjectField(kScopeInfoOffset); |