Commit 4b3bc29b authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

Add a feature flag for optimizing workers for performance

This fixes a mistake in crrev.com/747632 where the flag was added as
a runtime-enabled feature that is not visible to Finch. The flag now is
moved to blink/public/common/features.h

Bug: 1049132
Change-Id: I2d13e6cb97fd57535861379ae5fc80dba9dc252d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2102547Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750207}
parent 18ca2de5
...@@ -159,6 +159,11 @@ const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault", ...@@ -159,6 +159,11 @@ const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
const base::Feature kRTCOfferExtmapAllowMixed{ const base::Feature kRTCOfferExtmapAllowMixed{
"RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT}; "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
// Prevents workers from sending IsolateInBackgroundNotification to V8
// and thus instructs V8 to favor performance over memory on workers.
const base::Feature kV8OptimizeWorkersForPerformance{
"V8OptimizeWorkersForPerformance", base::FEATURE_DISABLED_BY_DEFAULT};
// Enables negotiation of experimental multiplex codec in SDP. // Enables negotiation of experimental multiplex codec in SDP.
const base::Feature kWebRtcMultiplexCodec{"WebRTC-MultiplexCodec", const base::Feature kWebRtcMultiplexCodec{"WebRTC-MultiplexCodec",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
......
...@@ -45,6 +45,7 @@ BLINK_COMMON_EXPORT extern const base::Feature kRawClipboard; ...@@ -45,6 +45,7 @@ BLINK_COMMON_EXPORT extern const base::Feature kRawClipboard;
BLINK_COMMON_EXPORT extern const base::Feature kRTCGetDisplayMedia; BLINK_COMMON_EXPORT extern const base::Feature kRTCGetDisplayMedia;
BLINK_COMMON_EXPORT extern const base::Feature kRTCUnifiedPlanByDefault; BLINK_COMMON_EXPORT extern const base::Feature kRTCUnifiedPlanByDefault;
BLINK_COMMON_EXPORT extern const base::Feature kRTCOfferExtmapAllowMixed; BLINK_COMMON_EXPORT extern const base::Feature kRTCOfferExtmapAllowMixed;
BLINK_COMMON_EXPORT extern const base::Feature kV8OptimizeWorkersForPerformance;
BLINK_COMMON_EXPORT extern const base::Feature kWebRtcMultiplexCodec; BLINK_COMMON_EXPORT extern const base::Feature kWebRtcMultiplexCodec;
BLINK_COMMON_EXPORT extern const base::Feature kWebRtcHideLocalIpsWithMdns; BLINK_COMMON_EXPORT extern const base::Feature kWebRtcHideLocalIpsWithMdns;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <memory> #include <memory>
#include "base/location.h" #include "base/location.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/web/blink.h" #include "third_party/blink/public/web/blink.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
...@@ -83,7 +84,8 @@ void WorkerBackingThread::InitializeOnBackingThread( ...@@ -83,7 +84,8 @@ void WorkerBackingThread::InitializeOnBackingThread(
V8PerIsolateData::From(isolate_)->SetThreadDebugger( V8PerIsolateData::From(isolate_)->SetThreadDebugger(
std::make_unique<WorkerThreadDebugger>(isolate_)); std::make_unique<WorkerThreadDebugger>(isolate_));
if (!RuntimeEnabledFeatures::V8OptimizeWorkersForPerformanceEnabled()) { if (!base::FeatureList::IsEnabled(
features::kV8OptimizeWorkersForPerformance)) {
// Optimize for memory usage instead of latency for the worker isolate. // Optimize for memory usage instead of latency for the worker isolate.
// Service Workers that have the fetch event handler run with the Isolate // Service Workers that have the fetch event handler run with the Isolate
// in foreground notification regardless of this configuration. // in foreground notification regardless of this configuration.
......
...@@ -1739,10 +1739,6 @@ ...@@ -1739,10 +1739,6 @@
{ {
name: "V8IdleTasks", name: "V8IdleTasks",
}, },
{
name: "V8OptimizeWorkersForPerformance",
status: "experimental",
},
{ {
// Whether a video element should automatically play fullscreen unless // Whether a video element should automatically play fullscreen unless
// 'playsinline' is set. // 'playsinline' is set.
......
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