diff --git a/common.gypi b/common.gypi index e0325c50efa..d2f21b77257 100644 --- a/common.gypi +++ b/common.gypi @@ -35,7 +35,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.19', + 'v8_embedder_string': '-node.20', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 63a1b6e686f..58438b0db65 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -4757,27 +4757,9 @@ class V8_EXPORT WasmModuleObject : public Object { */ CompiledWasmModule GetCompiledModule(); - /** - * If possible, deserialize the module, otherwise compile it from the provided - * uncompiled bytes. - */ - V8_DEPRECATED( - "Use WasmStreaming for deserialization from cache or the " - "CompiledWasmModule to transfer between isolates") - static MaybeLocal DeserializeOrCompile( - Isolate* isolate, MemorySpan serialized_module, - MemorySpan wire_bytes); - V8_INLINE static WasmModuleObject* Cast(Value* obj); private: - static MaybeLocal Deserialize( - Isolate* isolate, MemorySpan serialized_module, - MemorySpan wire_bytes); - static MaybeLocal Compile(Isolate* isolate, - const uint8_t* start, - size_t length); - static void CheckCast(Value* obj); }; diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index 4b71d6a446d..8e342d10d00 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -7181,57 +7181,6 @@ MaybeLocal WasmModuleObject::FromCompiledModule( Utils::ToLocal(i::Handle::cast(module_object))); } -MaybeLocal WasmModuleObject::Deserialize( - Isolate* isolate, MemorySpan serialized_module, - MemorySpan wire_bytes) { - i::Isolate* i_isolate = reinterpret_cast(isolate); - i::MaybeHandle maybe_module_object = - i::wasm::DeserializeNativeModule( - i_isolate, {serialized_module.data(), serialized_module.size()}, - {wire_bytes.data(), wire_bytes.size()}, {}); - i::Handle module_object; - if (!maybe_module_object.ToHandle(&module_object)) { - return MaybeLocal(); - } - return Local::Cast( - Utils::ToLocal(i::Handle::cast(module_object))); -} - -MaybeLocal WasmModuleObject::DeserializeOrCompile( - Isolate* isolate, MemorySpan serialized_module, - MemorySpan wire_bytes) { - MaybeLocal ret = - Deserialize(isolate, serialized_module, wire_bytes); - if (!ret.IsEmpty()) { - return ret; - } - return Compile(isolate, wire_bytes.data(), wire_bytes.size()); -} - -MaybeLocal WasmModuleObject::Compile(Isolate* isolate, - const uint8_t* start, - size_t length) { - i::Isolate* i_isolate = reinterpret_cast(isolate); - if (!i::wasm::IsWasmCodegenAllowed(i_isolate, i_isolate->native_context())) { - return MaybeLocal(); - } - i::MaybeHandle maybe_compiled; - { - i::wasm::ErrorThrower thrower(i_isolate, "WasmModuleObject::Compile()"); - auto enabled_features = i::wasm::WasmFeatures::FromIsolate(i_isolate); - maybe_compiled = i_isolate->wasm_engine()->SyncCompile( - i_isolate, enabled_features, &thrower, - i::wasm::ModuleWireBytes(start, start + length)); - } - CHECK_EQ(maybe_compiled.is_null(), i_isolate->has_pending_exception()); - if (maybe_compiled.is_null()) { - i_isolate->OptionalRescheduleException(false); - return MaybeLocal(); - } - return Local::Cast( - Utils::ToLocal(maybe_compiled.ToHandleChecked())); -} - WasmModuleObjectBuilderStreaming::WasmModuleObjectBuilderStreaming( Isolate* isolate) { USE(isolate_);