[api][wasm] Remove deprecated objects and methods
The API for serialized modules changed a bit in version 7.3. The old API is deprecated, hence remove it in 7.4. R=mstarzinger@chromium.org, ulan@chromium.org Bug: chromium:912031 Change-Id: Ib1a55dc88db9e98aef03006caf8cdc1be4f85b9f Reviewed-on: https://chromium-review.googlesource.com/c/1436020 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#59122}
This commit is contained in:
parent
3a638a57cf
commit
5b1c8b6b63
35
include/v8.h
35
include/v8.h
@ -4317,28 +4317,6 @@ class V8_EXPORT CompiledWasmModule {
|
||||
// An instance of WebAssembly.Module.
|
||||
class V8_EXPORT WasmModuleObject : public Object {
|
||||
public:
|
||||
// TODO(clemensh): Remove after 7.3 branch.
|
||||
V8_DEPRECATED("Use OwnedBuffer", typedef)
|
||||
std::pair<std::unique_ptr<const uint8_t[]>, size_t> SerializedModule;
|
||||
|
||||
/**
|
||||
* A unowned reference to a byte buffer.
|
||||
* TODO(clemensh): Remove after 7.3 branch.
|
||||
*/
|
||||
V8_DEPRECATED("Use MemorySpan<const uint8_t>", struct) BufferReference {
|
||||
const uint8_t* start;
|
||||
size_t size;
|
||||
BufferReference(const uint8_t* start, size_t size)
|
||||
: start(start), size(size) {}
|
||||
|
||||
// Implicit conversion to and from MemorySpan<const uint8_t>.
|
||||
BufferReference(MemorySpan<const uint8_t> span) // NOLINT(runtime/explicit)
|
||||
: start(span.data()), size(span.size()) {}
|
||||
operator MemorySpan<const uint8_t>() const {
|
||||
return MemorySpan<const uint8_t>{start, size};
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* An opaque, native heap object for transferring wasm modules. It
|
||||
* supports move semantics, and does not support copy semantics.
|
||||
@ -4380,25 +4358,12 @@ class V8_EXPORT WasmModuleObject : public Object {
|
||||
static MaybeLocal<WasmModuleObject> FromTransferrableModule(
|
||||
Isolate* isolate, const TransferrableModule&);
|
||||
|
||||
/**
|
||||
* Get the wasm-encoded bytes that were used to compile this module.
|
||||
*/
|
||||
V8_DEPRECATED("Use CompiledWasmModule::GetWireBytesRef()",
|
||||
BufferReference GetWasmWireBytesRef());
|
||||
|
||||
/**
|
||||
* Get the compiled module for this module object. The compiled module can be
|
||||
* shared by several module objects.
|
||||
*/
|
||||
CompiledWasmModule GetCompiledModule();
|
||||
|
||||
/**
|
||||
* Serialize the compiled module. The serialized data does not include the
|
||||
* uncompiled bytes.
|
||||
*/
|
||||
V8_DEPRECATED("Use CompiledWasmModule::Serialize()",
|
||||
SerializedModule Serialize());
|
||||
|
||||
/**
|
||||
* If possible, deserialize the module, otherwise compile it from the provided
|
||||
* uncompiled bytes.
|
||||
|
10
src/api.cc
10
src/api.cc
@ -7306,10 +7306,6 @@ MemorySpan<const uint8_t> CompiledWasmModule::GetWireBytesRef() {
|
||||
return {bytes_vec.start(), bytes_vec.size()};
|
||||
}
|
||||
|
||||
WasmModuleObject::BufferReference WasmModuleObject::GetWasmWireBytesRef() {
|
||||
return GetCompiledModule().GetWireBytesRef();
|
||||
}
|
||||
|
||||
WasmModuleObject::TransferrableModule
|
||||
WasmModuleObject::GetTransferrableModule() {
|
||||
if (i::FLAG_wasm_shared_code) {
|
||||
@ -7351,12 +7347,6 @@ MaybeLocal<WasmModuleObject> WasmModuleObject::FromTransferrableModule(
|
||||
}
|
||||
}
|
||||
|
||||
WasmModuleObject::SerializedModule WasmModuleObject::Serialize() {
|
||||
// TODO(clemensh): Deprecated; remove after M-73 branch.
|
||||
OwnedBuffer serialized = GetCompiledModule().Serialize();
|
||||
return {std::move(serialized.buffer), serialized.size};
|
||||
}
|
||||
|
||||
MaybeLocal<WasmModuleObject> WasmModuleObject::Deserialize(
|
||||
Isolate* isolate, MemorySpan<const uint8_t> serialized_module,
|
||||
MemorySpan<const uint8_t> wire_bytes) {
|
||||
|
Loading…
Reference in New Issue
Block a user