Skip to content

Commit

Permalink
Merged: [compile hints magic] Fix origin trial config
Browse files Browse the repository at this point in the history
A test will be added in a follow-up CL.

Bug: v8:13917, chromium:1459545
(cherry picked from commit 305ebd2)

Change-Id: Iccdc2fad9427c23f684905b0a6092d9985a504a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4670556
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/branch-heads/5845@{#411}
Cr-Branched-From: 5a5dff6-refs/heads/main@{#1160321}
  • Loading branch information
marjakh authored and Chromium LUCI CQ committed Jul 11, 2023
1 parent c60a1ab commit 14f09aa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,16 @@ bool WasmGCEnabledCallback(v8::Local<v8::Context> context) {
return RuntimeEnabledFeatures::WebAssemblyGCEnabled(execution_context);
}

bool JavaScriptCompileHintsMagicEnabledCallback(
v8::Local<v8::Context> context) {
ExecutionContext* execution_context = ToExecutionContext(context);
if (!execution_context) {
return false;
}
return RuntimeEnabledFeatures::JavaScriptCompileHintsMagicRuntimeEnabled(
execution_context);
}

v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
v8::Local<v8::Context> context,
v8::Local<v8::Data> v8_host_defined_options,
Expand Down Expand Up @@ -705,6 +715,8 @@ void InitializeV8Common(v8::Isolate* isolate) {
isolate->SetWasmGCEnabledCallback(WasmGCEnabledCallback);
isolate->SetSharedArrayBufferConstructorEnabledCallback(
SharedArrayBufferConstructorEnabledCallback);
isolate->SetJavaScriptCompileHintsMagicEnabledCallback(
JavaScriptCompileHintsMagicEnabledCallback);
isolate->SetHostImportModuleDynamicallyCallback(HostImportModuleDynamically);
isolate->SetHostInitializeImportMetaObjectCallback(
HostGetImportMetaProperties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ bool SharedStorageWorkletGlobalScope::FeatureEnabled(
return true;
}

if (feature == OriginTrialFeature::kJavaScriptCompileHintsMagicRuntime) {
return false;
}

NOTREACHED_NORETURN() << "Attempted to check OriginTrialFeature: "
<< static_cast<int32_t>(feature);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,11 @@
{
"name": "IntersectionOptimization",
},
{
name: "JavaScriptCompileHintsMagicRuntime",
status: "experimental",
origin_trial_feature_name: "JavaScriptCompileHintsMagic",
},
{
name: "KeyboardAccessibleTooltip",
status: "experimental",
Expand Down

0 comments on commit 14f09aa

Please sign in to comment.