0

Protected Audience: eagerly compile JS

Bug: 385384684
Change-Id: I43e4a2380db3f7f5b9eee89b3cbdbf62085956a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6115153
Reviewed-by: Russ Hamilton <behamilton@google.com>
Commit-Queue: Abigail Katcoff <abigailkatcoff@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1400495}
This commit is contained in:
Abigail Katcoff
2024-12-27 07:19:44 -08:00
committed by Chromium LUCI CQ
parent 54a40a4a64
commit 93b2018e7a
4 changed files with 30 additions and 1 deletions
content/services/auction_worklet
testing/variations
third_party/blink
common
public

@ -543,8 +543,12 @@ v8::MaybeLocal<v8::UnboundScript> AuctionV8Helper::Compile(
v8::ScriptCompiler::Source script_source(
src_string.ToLocalChecked(),
v8::ScriptOrigin(origin_string.ToLocalChecked()));
v8::ScriptCompiler::CompileOptions compile_options =
base::FeatureList::IsEnabled(blink::features::kFledgeEagerJSCompilation)
? v8::ScriptCompiler::kEagerCompile
: v8::ScriptCompiler::kNoCompileOptions;
auto result = v8::ScriptCompiler::CompileUnboundScript(
v8_isolate, &script_source, v8::ScriptCompiler::kNoCompileOptions,
v8_isolate, &script_source, compile_options,
v8::ScriptCompiler::NoCacheReason::kNoCacheNoReason);
if (try_catch.HasCaught()) {
error_out = FormatExceptionMessage(v8_isolate->GetCurrentContext(),

@ -17857,6 +17857,25 @@
]
}
],
"ProtectedAudienceEagerJSCompilation": [
{
"platforms": [
"chromeos",
"chromeos_lacros",
"linux",
"mac",
"windows"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"FledgeEagerJSCompilation"
]
}
]
}
],
"ProtectedAudienceEarlyProcessCreationStudy": [
{
"platforms": [

@ -1033,6 +1033,10 @@ BASE_FEATURE(kFledgeNoWasmLazyCompilation,
"FledgeNoWasmLazyCompilation",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kFledgeEagerJSCompilation,
"FledgeEagerJSCompilation",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kForceHighPerformanceGPUForWebGL,
"ForceHighPerformanceGPUForWebGL",
base::FEATURE_DISABLED_BY_DEFAULT);

@ -611,6 +611,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kFledgeNoWasmLazyCompilation);
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kFledgeEagerJSCompilation);
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kForceWebContentsDarkMode);
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE_PARAM(ForceDarkInversionMethod,
kForceDarkInversionMethodParam);