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. |
{ |