OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_process_impl.h" | 5 #include "content/renderer/render_process_impl.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
11 #include <objidl.h> | 11 #include <objidl.h> |
12 #include <mlang.h> | 12 #include <mlang.h> |
13 #endif | 13 #endif |
14 | 14 |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/feature_list.h" | 17 #include "base/feature_list.h" |
18 #include "base/sys_info.h" | 18 #include "base/sys_info.h" |
19 #include "content/child/site_isolation_stats_gatherer.h" | 19 #include "content/child/site_isolation_stats_gatherer.h" |
| 20 #include "content/public/common/content_features.h" |
20 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
21 #include "content/public/renderer/content_renderer_client.h" | 22 #include "content/public/renderer/content_renderer_client.h" |
22 #include "third_party/WebKit/public/web/WebFrame.h" | 23 #include "third_party/WebKit/public/web/WebFrame.h" |
23 #include "v8/include/v8.h" | 24 #include "v8/include/v8.h" |
24 | 25 |
25 namespace { | 26 namespace { |
26 | 27 |
27 const base::Feature kV8_ES2015_TailCalls_Feature { | 28 const base::Feature kV8_ES2015_TailCalls_Feature { |
28 "V8_ES2015_TailCalls", base::FEATURE_DISABLED_BY_DEFAULT | 29 "V8_ES2015_TailCalls", base::FEATURE_DISABLED_BY_DEFAULT |
29 }; | 30 }; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 80 } |
80 | 81 |
81 SetV8FlagIfFeature(kV8_ES2015_TailCalls_Feature, "--harmony-tailcalls"); | 82 SetV8FlagIfFeature(kV8_ES2015_TailCalls_Feature, "--harmony-tailcalls"); |
82 SetV8FlagIfFeature(kV8_ES2016_ExplicitTailCalls_Feature, | 83 SetV8FlagIfFeature(kV8_ES2016_ExplicitTailCalls_Feature, |
83 "--harmony-explicit-tailcalls"); | 84 "--harmony-explicit-tailcalls"); |
84 SetV8FlagIfFeature(kV8SerializeEagerFeature, "--serialize_eager"); | 85 SetV8FlagIfFeature(kV8SerializeEagerFeature, "--serialize_eager"); |
85 SetV8FlagIfFeature(kV8SerializeAgeCodeFeature, "--serialize_age_code"); | 86 SetV8FlagIfFeature(kV8SerializeAgeCodeFeature, "--serialize_age_code"); |
86 SetV8FlagIfHasSwitch(switches::kDisableJavaScriptHarmonyShipping, | 87 SetV8FlagIfHasSwitch(switches::kDisableJavaScriptHarmonyShipping, |
87 "--noharmony-shipping"); | 88 "--noharmony-shipping"); |
88 SetV8FlagIfHasSwitch(switches::kJavaScriptHarmony, "--harmony"); | 89 SetV8FlagIfHasSwitch(switches::kJavaScriptHarmony, "--harmony"); |
89 SetV8FlagIfHasSwitch(switches::kEnableAsmWasm, "--validate-asm"); | 90 SetV8FlagIfFeature(features::kAsmJsToWebAssembly, "--validate-asm"); |
90 SetV8FlagIfHasSwitch(switches::kEnableWasm, "--expose-wasm"); | 91 SetV8FlagIfFeature(features::kWebAssembly, "--expose-wasm"); |
91 | 92 |
92 const base::CommandLine& command_line = | 93 const base::CommandLine& command_line = |
93 *base::CommandLine::ForCurrentProcess(); | 94 *base::CommandLine::ForCurrentProcess(); |
94 | 95 |
95 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { | 96 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { |
96 std::string flags( | 97 std::string flags( |
97 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); | 98 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); |
98 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 99 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
99 } | 100 } |
100 | 101 |
(...skipping 13 matching lines...) Expand all Loading... |
114 | 115 |
115 void RenderProcessImpl::AddBindings(int bindings) { | 116 void RenderProcessImpl::AddBindings(int bindings) { |
116 enabled_bindings_ |= bindings; | 117 enabled_bindings_ |= bindings; |
117 } | 118 } |
118 | 119 |
119 int RenderProcessImpl::GetEnabledBindings() const { | 120 int RenderProcessImpl::GetEnabledBindings() const { |
120 return enabled_bindings_; | 121 return enabled_bindings_; |
121 } | 122 } |
122 | 123 |
123 } // namespace content | 124 } // namespace content |
OLD | NEW |