diff --git a/src/handles/handles.cc b/src/handles/handles.cc index a03a619922..85072a375a 100644 --- a/src/handles/handles.cc +++ b/src/handles/handles.cc @@ -43,7 +43,7 @@ bool HandleBase::IsDereferenceAllowed() const { } LocalHeap* local_heap = LocalHeap::Current(); - if (V8_UNLIKELY(local_heap)) { + if (FLAG_local_heaps && local_heap) { // Local heap can't access handles when parked if (!local_heap->IsHandleDereferenceAllowed()) return false; diff --git a/test/cctest/compiler/serializer-tester.cc b/test/cctest/compiler/serializer-tester.cc index 404529e71e..88e0becf23 100644 --- a/test/cctest/compiler/serializer-tester.cc +++ b/test/cctest/compiler/serializer-tester.cc @@ -31,6 +31,7 @@ SerializerTester::SerializerTester(const char* source) // We need allocation of executable memory for the compilation. FLAG_jitless = false; FLAG_allow_natives_syntax = true; + FlagList::EnforceFlagImplications(); std::string function_string = "(function() { "; function_string += source;