Commit 152bc72b authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[Snapshot] Reset JSFunction if bytecode is flushed when serializing snapshot.

BUG=v8:8395

Change-Id: Ia1eff1af446c346f27cc405eb4205e3a8c219086
Reviewed-on: https://chromium-review.googlesource.com/c/1371830Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58164}
parent f8f74270
......@@ -106,6 +106,7 @@ void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
// Unconditionally reset the JSFunction to its SFI's code, since we can't
// serialize optimized code anyway.
JSFunction closure = JSFunction::cast(obj);
closure->ResetIfBytecodeFlushed();
if (closure->is_compiled()) closure->set_code(closure->shared()->GetCode());
}
......
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