File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ class Private;
108
108
class Uint32;
109
109
class Utils;
110
110
class Value;
111
+ class WasmCompiledModule;
111
112
template <class T> class Local;
112
113
template <class T>
113
114
class MaybeLocal;
@@ -1707,6 +1708,8 @@ class V8_EXPORT ValueSerializer {
1707
1708
virtual Maybe<uint32_t> GetSharedArrayBufferId(
1708
1709
Isolate* isolate, Local<SharedArrayBuffer> shared_array_buffer);
1709
1710
1711
+ virtual Maybe<uint32_t> GetWasmModuleTransferId(
1712
+ Isolate* isolate, Local<WasmCompiledModule> module);
1710
1713
/*
1711
1714
* Allocates memory for the buffer of at least the size provided. The actual
1712
1715
* size (which may be greater or equal) is written to |actual_size|. If no
@@ -1817,6 +1820,13 @@ class V8_EXPORT ValueDeserializer {
1817
1820
* MaybeLocal<Object>() returned.
1818
1821
*/
1819
1822
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);
1820
1830
};
1821
1831
1822
1832
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(
3119
3119
return Nothing<uint32_t>();
3120
3120
}
3121
3121
3122
+ Maybe<uint32_t> ValueSerializer::Delegate::GetWasmModuleTransferId(
3123
+ Isolate* v8_isolate, Local<WasmCompiledModule> module) {
3124
+ return Nothing<uint32_t>();
3125
+ }
3126
+
3122
3127
void* ValueSerializer::Delegate::ReallocateBufferMemory(void* old_buffer,
3123
3128
size_t size,
3124
3129
size_t* actual_size) {
@@ -3207,6 +3212,15 @@ MaybeLocal<Object> ValueDeserializer::Delegate::ReadHostObject(
3207
3212
return MaybeLocal<Object>();
3208
3213
}
3209
3214
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
+
3210
3224
struct ValueDeserializer::PrivateData {
3211
3225
PrivateData(i::Isolate* i, i::Vector<const uint8_t> data, Delegate* delegate)
3212
3226
: isolate(i), deserializer(i, data, delegate) {}
You can’t perform that action at this time.
0 commit comments