File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ class Private;
108108class Uint32;
109109class Utils;
110110class Value;
111+ class WasmCompiledModule;
111112template <class T> class Local;
112113template <class T>
113114class MaybeLocal;
@@ -1707,6 +1708,8 @@ class V8_EXPORT ValueSerializer {
17071708 virtual Maybe<uint32_t> GetSharedArrayBufferId(
17081709 Isolate* isolate, Local<SharedArrayBuffer> shared_array_buffer);
17091710
1711+ virtual Maybe<uint32_t> GetWasmModuleTransferId(
1712+ Isolate* isolate, Local<WasmCompiledModule> module);
17101713 /*
17111714 * Allocates memory for the buffer of at least the size provided. The actual
17121715 * size (which may be greater or equal) is written to |actual_size|. If no
@@ -1817,6 +1820,13 @@ class V8_EXPORT ValueDeserializer {
18171820 * MaybeLocal<Object>() returned.
18181821 */
18191822 virtual MaybeLocal<Object> ReadHostObject(Isolate* isolate);
1823+
1824+ /*
1825+ * Get a WasmCompiledModule given a transfer_id previously provided
1826+ * by ValueSerializer::GetWasmModuleTransferId
1827+ */
1828+ virtual MaybeLocal<WasmCompiledModule> GetWasmModuleFromId(
1829+ Isolate* isolate, uint32_t transfer_id);
18201830 };
18211831
18221832 ValueDeserializer(Isolate* isolate, const uint8_t* data, size_t size);
Original file line number Diff line number Diff line change @@ -3119,6 +3119,11 @@ Maybe<uint32_t> ValueSerializer::Delegate::GetSharedArrayBufferId(
31193119 return Nothing<uint32_t >();
31203120}
31213121
3122+ Maybe<uint32_t > ValueSerializer::Delegate::GetWasmModuleTransferId (
3123+ Isolate* v8_isolate, Local<WasmCompiledModule> module ) {
3124+ return Nothing<uint32_t >();
3125+ }
3126+
31223127void * ValueSerializer::Delegate::ReallocateBufferMemory (void * old_buffer,
31233128 size_t size,
31243129 size_t * actual_size) {
@@ -3207,6 +3212,15 @@ MaybeLocal<Object> ValueDeserializer::Delegate::ReadHostObject(
32073212 return MaybeLocal<Object>();
32083213}
32093214
3215+ MaybeLocal<WasmCompiledModule> ValueDeserializer::Delegate::GetWasmModuleFromId (
3216+ Isolate* v8_isolate, uint32_t id) {
3217+ i::Isolate* isolate = reinterpret_cast <i::Isolate*>(v8_isolate);
3218+ isolate->ScheduleThrow (*isolate->factory ()->NewError (
3219+ isolate->error_function (),
3220+ i::MessageTemplate::kDataCloneDeserializationError ));
3221+ return MaybeLocal<WasmCompiledModule>();
3222+ }
3223+
32103224struct ValueDeserializer ::PrivateData {
32113225 PrivateData (i::Isolate* i, i::Vector<const uint8_t > data, Delegate* delegate)
32123226 : isolate(i), deserializer(i, data, delegate) {}
You can’t perform that action at this time.
0 commit comments