Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index 83009d7c81def5acbd56bc711fc5f2c5528db216..833c39902559e4d86bea1a1b82e27282d6a97b6e 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -294,6 +294,15 @@ void WasmJs::Install(Isolate* isolate, Handle<JSGlobalObject> global) { |
InstallFunc(isolate, wasm_object, "instantiateModule", InstantiateModule); |
InstallFunc(isolate, wasm_object, "instantiateModuleFromAsm", |
InstantiateModuleFromAsm); |
+ |
+ { |
+ // Add the Wasm.experimentalVersion property. |
+ Handle<String> name = v8_str(isolate, "experimentalVersion"); |
+ PropertyAttributes attributes = |
+ static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); |
+ Handle<Smi> value = Handle<Smi>(Smi::FromInt(wasm::kWasmVersion), isolate); |
+ JSObject::AddProperty(wasm_object, name, value, attributes); |
+ } |
} |