Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 085f96ef2a1f26ef5479adc82ae7f9d7e42955fb..dac0724f584f8c39ac1340c949da53e79ef90aea 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -4163,8 +4163,6 @@ bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { |
Factory* factory = isolate->factory(); |
HandleScope scope(isolate); |
- Handle<JSGlobalObject> global(JSGlobalObject::cast( |
- native_context->global_object())); |
Handle<JSObject> Error = isolate->error_function(); |
Handle<String> name = |
@@ -4172,7 +4170,9 @@ bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { |
Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); |
JSObject::AddProperty(Error, name, stack_trace_limit, NONE); |
- WasmJs::Install(isolate, global); |
+ if (FLAG_expose_wasm || FLAG_validate_asm) { |
+ WasmJs::Install(isolate); |
+ } |
return true; |
} |