Index: src/wasm/wasm-js.cc |
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc |
index 853a77f3ccaedfdb094c22b462885392812112a3..020996e2e18f3f4869f5e3faefb337d5f92591c8 100644 |
--- a/src/wasm/wasm-js.cc |
+++ b/src/wasm/wasm-js.cc |
@@ -195,20 +195,9 @@ static i::MaybeHandle<i::JSObject> CreateModuleObject( |
if (buffer.start == nullptr) return i::MaybeHandle<i::JSObject>(); |
DCHECK(source->IsArrayBuffer() || source->IsTypedArray()); |
- i::Zone zone(i_isolate->allocator()); |
- i::wasm::ModuleResult result = i::wasm::DecodeWasmModule( |
- i_isolate, &zone, buffer.start, buffer.end, false, i::wasm::kWasmOrigin); |
- std::unique_ptr<const i::wasm::WasmModule> decoded_module(result.val); |
- if (result.failed()) { |
- thrower->Failed("", result); |
- return nothing; |
- } |
- i::MaybeHandle<i::FixedArray> compiled_module = |
- decoded_module->CompileFunctions(i_isolate, thrower); |
- if (compiled_module.is_null()) return nothing; |
- |
- return i::wasm::CreateCompiledModuleObject(i_isolate, |
- compiled_module.ToHandleChecked()); |
+ return i::wasm::CreateModuleObjectFromBytes( |
+ i_isolate, buffer.start, buffer.end, thrower, false, |
+ i::wasm::ModuleOrigin::kWasmOrigin); |
} |
void WebAssemblyCompile(const v8::FunctionCallbackInfo<v8::Value>& args) { |
@@ -350,10 +339,6 @@ void WasmJs::Install(Isolate* isolate, Handle<JSGlobalObject> global) { |
Handle<Context> context(global->native_context(), isolate); |
InstallWasmFunctionMap(isolate, context); |
- if (!FLAG_expose_wasm) { |
bradnelson
2016/09/01 03:48:31
I don't think you want to drop this.
This will mak
Mircea Trofin
2016/09/01 04:36:17
Done.
|
- return; |
- } |
- |
// Bind the experimental WASM object. |
// TODO(rossberg, titzer): remove once it's no longer needed. |
{ |