Commit da3eabd6 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[v8] Avoid deprecated wasm API

The TransferrableModule became obsolete with
https://crrev.com/c/1847366 and will be deprecated soon.
This CL switches all uses to the WasmCompiledModule.

R=mlippautz@chromium.org

Change-Id: Ib53653c661e0381377cb1fe653f02c8a289b2141
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1855822Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705057}
parent 2c8d5ba5
......@@ -74,8 +74,7 @@ class CORE_EXPORT SerializedScriptValue
using ArrayBufferContentsArray = Vector<WTF::ArrayBufferContents, 1>;
using SharedArrayBufferContentsArray = Vector<WTF::ArrayBufferContents, 1>;
using ImageBitmapContentsArray = Vector<scoped_refptr<StaticBitmapImage>, 1>;
using TransferredWasmModulesArray =
WTF::Vector<v8::WasmModuleObject::TransferrableModule>;
using TransferredWasmModulesArray = WTF::Vector<v8::CompiledWasmModule>;
using MessagePortChannelArray = Vector<MessagePortChannel>;
// Increment this for each incompatible change to the wire format.
......
......@@ -693,7 +693,7 @@ v8::MaybeLocal<v8::WasmModuleObject>
V8ScriptValueDeserializer::GetWasmModuleFromId(v8::Isolate* isolate,
uint32_t id) {
if (id < serialized_script_value_->WasmModules().size()) {
return v8::WasmModuleObject::FromTransferrableModule(
return v8::WasmModuleObject::FromCompiledModule(
isolate, serialized_script_value_->WasmModules()[id]);
}
CHECK(serialized_script_value_->WasmModules().IsEmpty());
......
......@@ -754,7 +754,7 @@ v8::Maybe<uint32_t> V8ScriptValueSerializer::GetWasmModuleTransferId(
// around. Most likely, we'll have one module. The vector approach is
// simple and should perform sufficiently well under these expectations.
serialized_script_value_->WasmModules().push_back(
module->GetTransferrableModule());
module->GetCompiledModule());
uint32_t size =
static_cast<uint32_t>(serialized_script_value_->WasmModules().size());
DCHECK_GE(size, 1u);
......
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