Commit 7e4e3e05 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[wasm] Revert ImportNativeModule call semantic

Bug: v8:8015
Change-Id: If6017a85683efcc847dab8034fdd82ac51106317
Reviewed-on: https://chromium-review.googlesource.com/1213182Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55721}
parent 77abc64d
......@@ -186,12 +186,12 @@ std::shared_ptr<NativeModule> WasmEngine::ExportNativeModule(
}
Handle<WasmModuleObject> WasmEngine::ImportNativeModule(
Isolate* isolate, const std::shared_ptr<NativeModule>& shared_module) {
Isolate* isolate, std::shared_ptr<NativeModule> shared_module) {
CHECK_EQ(code_manager(), shared_module->code_manager());
Vector<const byte> wire_bytes = shared_module->wire_bytes();
Handle<Script> script = CreateWasmScript(isolate, wire_bytes);
Handle<WasmModuleObject> module_object =
WasmModuleObject::New(isolate, shared_module, script);
WasmModuleObject::New(isolate, std::move(shared_module), script);
// TODO(6792): Wrappers below might be cloned using {Factory::CopyCode}.
// This requires unlocking the code space here. This should eventually be
......
......@@ -106,7 +106,7 @@ class V8_EXPORT_PRIVATE WasmEngine {
// Imports the shared part of a module from a different Context/Isolate using
// the the same engine, recreating a full module object in the given Isolate.
Handle<WasmModuleObject> ImportNativeModule(
Isolate* isolate, const std::shared_ptr<NativeModule>& shared_module);
Isolate* isolate, std::shared_ptr<NativeModule> shared_module);
WasmCodeManager* code_manager() const { return code_manager_.get(); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment