Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index 3b233024e63ffdcf3cf0b23987bf335b9c897e5a..4f37c2b20dc146651f7169ad9007e8cb90bfb3a6 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -943,30 +943,35 @@ void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() { |
void JSModuleNamespace::JSModuleNamespaceVerify() { |
CHECK(IsJSModuleNamespace()); |
- module()->ObjectVerify(); |
+ VerifyPointer(module()); |
} |
void JSFixedArrayIterator::JSFixedArrayIteratorVerify() { |
CHECK(IsJSFixedArrayIterator()); |
- CHECK(array()->IsFixedArray()); |
+ VerifyPointer(array()); |
+ VerifyPointer(initial_next()); |
VerifySmiField(kIndexOffset); |
- CHECK(initial_next()->IsJSFunction()); |
CHECK_LE(index(), array()->length()); |
} |
void Module::ModuleVerify() { |
- Isolate* isolate = GetIsolate(); |
CHECK(IsModule()); |
- CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction()); |
- code()->ObjectVerify(); |
- exports()->ObjectVerify(); |
- requested_modules()->ObjectVerify(); |
- VerifySmiField(kFlagsOffset); |
+ |
+ VerifyPointer(code()); |
+ VerifyPointer(exports()); |
+ VerifyPointer(module_namespace()); |
+ VerifyPointer(requested_modules()); |
VerifySmiField(kHashOffset); |
- CHECK(module_namespace()->IsUndefined(isolate) || |
+ |
+ CHECK((!instantiated() && code()->IsSharedFunctionInfo()) || |
+ (instantiated() && !evaluated() && code()->IsJSFunction()) || |
+ (instantiated() && evaluated() && code()->IsModuleInfo())); |
+ |
+ CHECK(module_namespace()->IsUndefined(GetIsolate()) || |
module_namespace()->IsJSModuleNamespace()); |
+ |
// TODO(neis): Check more. |
} |