Chromium Code Reviews| Index: src/objects-debug.cc |
| diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
| index 44cab53cc7ae90696e7c34929084e0e6e1e318bd..77c8075fe71eb6094743703d08981d3d0ffc6979 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,24 @@ void FixedDoubleArray::FixedDoubleArrayVerify() { |
| } |
| +void JSGeneratorObject::JSGeneratorObjectVerify() { |
| + VerifyObjectField(kFunctionOffset); |
| + VerifyObjectField(kContextOffset); |
| + VerifyObjectField(kOperandStackOffset); |
| + if (function()->IsUndefined()) { |
|
Michael Starzinger
2013/04/14 21:32:50
Just out of curiosity, is there a particular reaso
wingo
2013/04/15 09:24:57
Changed to use undefined. I also relaxed these ch
|
| + // Uninitialized object from constructor. |
| + CHECK(context()->IsUndefined()); |
| + CHECK(operand_stack()->IsUndefined()); |
| + } else { |
| + CHECK(context() == Smi::FromInt(0) || context()->IsContext()); |
| + VerifySmiField(kContinuationOffset); |
| + CHECK_GE(continuation(), 0); |
| + CHECK(operand_stack() == Smi::FromInt(0) || |
| + operand_stack()->IsFixedArray()); |
| + } |
| +} |
| + |
| + |
| void JSModule::JSModuleVerify() { |
| VerifyObjectField(kContextOffset); |
| VerifyObjectField(kScopeInfoOffset); |