Commit 9c4f57f6 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

Retain code correctly in %PrepareFunctionForOptimization

IsCompiledScope retains code to be safe against bytecode flushing, but
%PrepareFunctionForOptimization isn't currently initializing it with the
function's current compiled state. IOW, it's only retaining freshly
compiled code and is causing flakes for already-compiled functions.

Bug: v8:12697
Change-Id: Ie82a4adb8a136da708b3ae0ce27a42f5c277d324
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3668318Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80756}
parent 600cebb4
......@@ -32,7 +32,7 @@ void PendingOptimizationTable::PreparedForOptimization(
}
Handle<SharedFunctionInfo> shared_info(function->shared(), isolate);
IsCompiledScope is_compiled_scope;
IsCompiledScope is_compiled_scope = shared_info->is_compiled_scope(isolate);
SharedFunctionInfo::EnsureBytecodeArrayAvailable(isolate, shared_info,
&is_compiled_scope);
......
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