Skip to content

Commit 2ee8b4a

Browse files
addaleaxBethGriggs
authored andcommitted
deps: V8: cherry-pick e395d1698453
Original commit message: [api] Remove deprecated DeserializeOrCompile method This method was used to implement deserialization via the value serializer. It was deprecated since this functionality is not used any more, and hence untested. This CL cleans up by removing the deprecated method and two private helper methods. R=adamk@chromium.org Bug: v8:10155 Change-Id: I4dda1949fd4f1b499cb6f8d6e6a76b642179303a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033171 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66096} Refs: v8/v8@e395d16 PR-URL: #32885 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
1 parent dfc66a6 commit 2ee8b4a

File tree

3 files changed

+1
-70
lines changed

3 files changed

+1
-70
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
# Reset this number to 0 on major V8 upgrades.
3737
# Increment by one for each non-official patch applied to deps/v8.
38-
'v8_embedder_string': '-node.19',
38+
'v8_embedder_string': '-node.20',
3939

4040
##### V8 defaults for Node.js #####
4141

deps/v8/include/v8.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4757,27 +4757,9 @@ class V8_EXPORT WasmModuleObject : public Object {
47574757
*/
47584758
CompiledWasmModule GetCompiledModule();
47594759

4760-
/**
4761-
* If possible, deserialize the module, otherwise compile it from the provided
4762-
* uncompiled bytes.
4763-
*/
4764-
V8_DEPRECATED(
4765-
"Use WasmStreaming for deserialization from cache or the "
4766-
"CompiledWasmModule to transfer between isolates")
4767-
static MaybeLocal<WasmModuleObject> DeserializeOrCompile(
4768-
Isolate* isolate, MemorySpan<const uint8_t> serialized_module,
4769-
MemorySpan<const uint8_t> wire_bytes);
4770-
47714760
V8_INLINE static WasmModuleObject* Cast(Value* obj);
47724761

47734762
private:
4774-
static MaybeLocal<WasmModuleObject> Deserialize(
4775-
Isolate* isolate, MemorySpan<const uint8_t> serialized_module,
4776-
MemorySpan<const uint8_t> wire_bytes);
4777-
static MaybeLocal<WasmModuleObject> Compile(Isolate* isolate,
4778-
const uint8_t* start,
4779-
size_t length);
4780-
47814763
static void CheckCast(Value* obj);
47824764
};
47834765

deps/v8/src/api/api.cc

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7181,57 +7181,6 @@ MaybeLocal<WasmModuleObject> WasmModuleObject::FromCompiledModule(
71817181
Utils::ToLocal(i::Handle<i::JSObject>::cast(module_object)));
71827182
}
71837183

7184-
MaybeLocal<WasmModuleObject> WasmModuleObject::Deserialize(
7185-
Isolate* isolate, MemorySpan<const uint8_t> serialized_module,
7186-
MemorySpan<const uint8_t> wire_bytes) {
7187-
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7188-
i::MaybeHandle<i::WasmModuleObject> maybe_module_object =
7189-
i::wasm::DeserializeNativeModule(
7190-
i_isolate, {serialized_module.data(), serialized_module.size()},
7191-
{wire_bytes.data(), wire_bytes.size()}, {});
7192-
i::Handle<i::WasmModuleObject> module_object;
7193-
if (!maybe_module_object.ToHandle(&module_object)) {
7194-
return MaybeLocal<WasmModuleObject>();
7195-
}
7196-
return Local<WasmModuleObject>::Cast(
7197-
Utils::ToLocal(i::Handle<i::JSObject>::cast(module_object)));
7198-
}
7199-
7200-
MaybeLocal<WasmModuleObject> WasmModuleObject::DeserializeOrCompile(
7201-
Isolate* isolate, MemorySpan<const uint8_t> serialized_module,
7202-
MemorySpan<const uint8_t> wire_bytes) {
7203-
MaybeLocal<WasmModuleObject> ret =
7204-
Deserialize(isolate, serialized_module, wire_bytes);
7205-
if (!ret.IsEmpty()) {
7206-
return ret;
7207-
}
7208-
return Compile(isolate, wire_bytes.data(), wire_bytes.size());
7209-
}
7210-
7211-
MaybeLocal<WasmModuleObject> WasmModuleObject::Compile(Isolate* isolate,
7212-
const uint8_t* start,
7213-
size_t length) {
7214-
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
7215-
if (!i::wasm::IsWasmCodegenAllowed(i_isolate, i_isolate->native_context())) {
7216-
return MaybeLocal<WasmModuleObject>();
7217-
}
7218-
i::MaybeHandle<i::JSObject> maybe_compiled;
7219-
{
7220-
i::wasm::ErrorThrower thrower(i_isolate, "WasmModuleObject::Compile()");
7221-
auto enabled_features = i::wasm::WasmFeatures::FromIsolate(i_isolate);
7222-
maybe_compiled = i_isolate->wasm_engine()->SyncCompile(
7223-
i_isolate, enabled_features, &thrower,
7224-
i::wasm::ModuleWireBytes(start, start + length));
7225-
}
7226-
CHECK_EQ(maybe_compiled.is_null(), i_isolate->has_pending_exception());
7227-
if (maybe_compiled.is_null()) {
7228-
i_isolate->OptionalRescheduleException(false);
7229-
return MaybeLocal<WasmModuleObject>();
7230-
}
7231-
return Local<WasmModuleObject>::Cast(
7232-
Utils::ToLocal(maybe_compiled.ToHandleChecked()));
7233-
}
7234-
72357184
WasmModuleObjectBuilderStreaming::WasmModuleObjectBuilderStreaming(
72367185
Isolate* isolate) {
72377186
USE(isolate_);

0 commit comments

Comments
 (0)