Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2173)

Unified Diff: content/renderer/render_process_impl.cc

Issue 2642793003: [wasm] Change WebAssembly flags option to only cover structured cloning. (Closed)
Patch Set: fix Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/runtime_features.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_process_impl.cc
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index fa6012ceace8c33a6351ee5ca18a3dd84f8314fc..fb207b55bb1cecdb71cafe6a666628aca7660399 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -69,6 +69,12 @@ void SetV8FlagIfFeature(const base::Feature& feature, const char* v8_flag) {
}
}
+void SetV8FlagIfNotFeature(const base::Feature& feature, const char* v8_flag) {
+ if (!base::FeatureList::IsEnabled(feature)) {
+ v8::V8::SetFlagsFromString(v8_flag, strlen(v8_flag));
+ }
+}
+
void SetV8FlagIfHasSwitch(const char* switch_name, const char* v8_flag) {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switch_name)) {
v8::V8::SetFlagsFromString(v8_flag, strlen(v8_flag));
@@ -171,7 +177,8 @@ RenderProcessImpl::RenderProcessImpl()
"--noharmony-shipping");
SetV8FlagIfHasSwitch(switches::kJavaScriptHarmony, "--harmony");
SetV8FlagIfFeature(features::kAsmJsToWebAssembly, "--validate-asm");
- SetV8FlagIfFeature(features::kWebAssembly, "--expose-wasm");
+ SetV8FlagIfNotFeature(features::kWebAssembly,
+ "--wasm-disable-structured-cloning");
SetV8FlagIfFeature(features::kSharedArrayBuffer,
"--harmony-sharedarraybuffer");
« no previous file with comments | « content/child/runtime_features.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698