Index: test/cctest/test-serialize.cc |
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc |
index 716b2788243d85beb96c9b1af4cdfe99305a81f2..8477c384f3c245e3a8f844b4a9f8550d97149c60 100644 |
--- a/test/cctest/test-serialize.cc |
+++ b/test/cctest/test-serialize.cc |
@@ -517,7 +517,6 @@ static void PartiallySerializeCustomContext( |
UNINITIALIZED_TEST(PartialSerializerCustomContext) { |
DisableTurbofan(); |
- FLAG_crankshaft = false; |
Vector<const byte> startup_blob; |
Vector<const byte> partial_blob; |
PartiallySerializeCustomContext(&startup_blob, &partial_blob); |
@@ -540,6 +539,13 @@ UNINITIALIZED_TEST(PartialSerializerCustomContext) { |
.ToHandleChecked(); |
CHECK(root->IsContext()); |
Handle<Context> context = Handle<Context>::cast(root); |
+ |
+ // Add context to the weak native context list |
+ context->set(Context::NEXT_CONTEXT_LINK, |
+ isolate->heap()->native_contexts_list(), |
+ UPDATE_WEAK_WRITE_BARRIER); |
+ isolate->heap()->set_native_contexts_list(*context); |
+ |
CHECK(context->global_proxy() == *global_proxy); |
Handle<String> o = isolate->factory()->NewStringFromAsciiChecked("o"); |
Handle<JSObject> global_object(context->global_object(), isolate); |