diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc index 53250c5b75a..cf63124cc08 100644 --- a/runtime/vm/dart.cc +++ b/runtime/vm/dart.cc @@ -861,7 +861,9 @@ ErrorPtr Dart::InitializeIsolate(const uint8_t* snapshot_data, } Object::VerifyBuiltinVtables(); - DEBUG_ONLY(IG->heap()->Verify(kForbidMarked)); + if (T->isolate()->origin_id() == 0) { + DEBUG_ONLY(IG->heap()->Verify(kForbidMarked)); + } #if defined(DART_PRECOMPILED_RUNTIME) const bool kIsAotRuntime = true; diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc index 842bc8f7771..2e26b486c42 100644 --- a/runtime/vm/dart_api_impl.cc +++ b/runtime/vm/dart_api_impl.cc @@ -1499,7 +1499,9 @@ DART_EXPORT void Dart_ShutdownIsolate() { StackZone zone(T); HandleScope handle_scope(T); #if defined(DEBUG) - T->isolate_group()->ValidateConstants(); + if (T->isolate()->origin_id() == 0) { + T->isolate_group()->ValidateConstants(); + } #endif Dart::RunShutdownCallback(); }