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

Unified Diff: src/wasm/wasm-js.cc

Issue 2118733003: [wasm] Dont ship by default. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | test/mjsunit/wasm/no-wasm-by-default.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-js.cc
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc
index 21b32e7eb6499dc2e40943719b1b23cc5dfbef2c..d85e3da412f9d559de8e277cb6864d5da1b3771f 100644
--- a/src/wasm/wasm-js.cc
+++ b/src/wasm/wasm-js.cc
@@ -415,12 +415,20 @@ static Handle<JSFunction> InstallFunc(Isolate* isolate, Handle<JSObject> object,
}
void WasmJs::Install(Isolate* isolate, Handle<JSGlobalObject> global) {
+ if (!FLAG_expose_wasm && !FLAG_validate_asm) {
+ return;
+ }
+
Factory* factory = isolate->factory();
// Setup wasm function map.
Handle<Context> context(global->native_context(), isolate);
InstallWasmFunctionMap(isolate, context);
+ if (!FLAG_expose_wasm) {
+ return;
+ }
+
// Bind the experimental WASM object.
// TODO(rossberg, titzer): remove once it's no longer needed.
{
« no previous file with comments | « no previous file | test/mjsunit/wasm/no-wasm-by-default.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698