mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-28 13:13:37 +08:00
[npm] Fix enabled/disabled features.
Pass only a single `--disable-features=` / `--enable-features` CLI flag to Chrome binary. Bug: 404192426 Change-Id: I858f87b41e9328cb0e3b9a5c7e16a0f57a73be53 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6367217 Commit-Queue: Mathias Bynens <mathias@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
This commit is contained in:
+5
-13
@@ -47,14 +47,6 @@ def parse_options(args):
|
||||
const='canary',
|
||||
dest='browser',
|
||||
help='launch in Chrome Canary')
|
||||
parser.add_argument('--enable-features',
|
||||
action='append',
|
||||
default=[],
|
||||
help='enable experimental Chrome features')
|
||||
parser.add_argument('--disable-features',
|
||||
action='append',
|
||||
default=[],
|
||||
help='disable experimental Chrome features')
|
||||
parser.add_argument('--no-auto-open-devtools-for-tabs',
|
||||
action='store_true',
|
||||
help='don\'t automatically open DevTools for new tabs')
|
||||
@@ -119,11 +111,11 @@ def start(options):
|
||||
if platform.system() == 'Darwin':
|
||||
args += ['--use-mock-keychain']
|
||||
|
||||
# Disable/Enable experimental features, starting with defaults.
|
||||
args += ['--disable-features=%s' % f for f in DISABLE_FEATURES]
|
||||
args += ['--enable-features=%s' % f for f in ENABLE_FEATURES]
|
||||
args += ['--disable-features=%s' % f for f in options.disable_features]
|
||||
args += ['--enable-features=%s' % f for f in options.enable_features]
|
||||
# Disable/Enable experimental features.
|
||||
if len(DISABLE_FEATURES) > 0:
|
||||
args += ['--disable-features=%s' % ','.join(DISABLE_FEATURES)]
|
||||
if len(ENABLE_FEATURES) > 0:
|
||||
args += ['--enable-features=%s' % ','.join(ENABLE_FEATURES)]
|
||||
|
||||
# Open with our freshly built DevTools front-end.
|
||||
args += [
|
||||
|
||||
Reference in New Issue
Block a user