File tree Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Expand file tree Collapse file tree 5 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -806,7 +806,7 @@ const Experiment kExperiments[] = {
806
806
IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME,
807
807
IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION,
808
808
kOsAll ,
809
- SINGLE_VALUE_TYPE_AND_VALUE (switches::kJavaScriptFlags , " --harmony " )
809
+ SINGLE_VALUE_TYPE (switches::kJavaScriptHarmony )
810
810
},
811
811
{
812
812
" disable-software-rasterizer" ,
Original file line number Diff line number Diff line change @@ -1359,6 +1359,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
1359
1359
switches::kEnableShowModalDialog ,
1360
1360
switches::kEnableStreamlinedHostedApps ,
1361
1361
switches::kEnableWebBasedSignin ,
1362
+ switches::kJavaScriptHarmony ,
1362
1363
switches::kMessageLoopHistogrammer ,
1363
1364
switches::kOutOfProcessPdf ,
1364
1365
switches::kPlaybackMode ,
Original file line number Diff line number Diff line change @@ -759,6 +759,9 @@ const char kInstantProcess[] = "instant-process";
759
759
// enabled.
760
760
const char kInvalidationUseGCMChannel [] = " invalidation-use-gcm-channel" ;
761
761
762
+ // Enables experimental Harmony (ECMAScript 6) features.
763
+ const char kJavaScriptHarmony [] = " javascript-harmony" ;
764
+
762
765
// Specifies the testcase used by the IPC fuzzer.
763
766
const char kIpcFuzzerTestcase [] = " ipc-fuzzer-testcase" ;
764
767
Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ extern const char kInstallFromWebstore[];
215
215
extern const char kInstantProcess [];
216
216
extern const char kInvalidationUseGCMChannel [];
217
217
extern const char kIpcFuzzerTestcase [];
218
+ extern const char kJavaScriptHarmony [];
218
219
extern const char kKeepAliveForTest [];
219
220
extern const char kKioskMode [];
220
221
extern const char kKioskModePrinting [];
Original file line number Diff line number Diff line change @@ -264,6 +264,11 @@ ChromeRenderProcessObserver::ChromeRenderProcessObserver(
264
264
if (command_line.HasSwitch (switches::kEnableShowModalDialog ))
265
265
WebRuntimeFeatures::enableShowModalDialog (true );
266
266
267
+ if (command_line.HasSwitch (switches::kJavaScriptHarmony )) {
268
+ std::string flag (" --harmony" );
269
+ v8::V8::SetFlagsFromString (flag.c_str (), static_cast <int >(flag.size ()));
270
+ }
271
+
267
272
RenderThread* thread = RenderThread::Get ();
268
273
resource_delegate_.reset (new RendererResourceDelegate ());
269
274
thread->SetResourceDispatcherDelegate (resource_delegate_.get ());
You can’t perform that action at this time.
0 commit comments