Commit fe921661 authored by yangguo's avatar yangguo Committed by Commit bot

[serializer] allow test-serialize/PartialSerializerCustomContext to optimize.

Previously, optimization has been disabled because of an assertion
failure, which requires the context to be linked into the weak native
context list of the heap.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/1777883003

Cr-Commit-Position: refs/heads/master@{#34661}
parent 79ccf34a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment