5#ifndef INCLUDE_V8_VALUE_SERIALIZER_H_
6#define INCLUDE_V8_VALUE_SERIALIZER_H_
22class SharedArrayBuffer;
24class WasmModuleObject;
28struct ScriptStreamingData;
164 PrivateData* private_;
189 Isolate* isolate, uint32_t transfer_id);
196 Isolate* isolate, uint32_t clone_id);
209 uint32_t shared_value_id);
274 PrivateData* private_;
virtual MaybeLocal< Value > GetSharedValueFromId(Isolate *isolate, uint32_t shared_value_id)
virtual bool SupportsSharedValues() const
virtual MaybeLocal< Object > ReadHostObject(Isolate *isolate)
virtual MaybeLocal< WasmModuleObject > GetWasmModuleFromId(Isolate *isolate, uint32_t transfer_id)
virtual ~Delegate()=default
virtual MaybeLocal< SharedArrayBuffer > GetSharedArrayBufferFromId(Isolate *isolate, uint32_t clone_id)
void TransferArrayBuffer(uint32_t transfer_id, Local< ArrayBuffer > array_buffer)
V8_WARN_UNUSED_RESULT bool ReadUint32(uint32_t *value)
void TransferSharedArrayBuffer(uint32_t id, Local< SharedArrayBuffer > shared_array_buffer)
ValueDeserializer(const ValueDeserializer &)=delete
V8_WARN_UNUSED_RESULT Maybe< bool > ReadHeader(Local< Context > context)
V8_WARN_UNUSED_RESULT bool ReadRawBytes(size_t length, const void **data)
ValueDeserializer(Isolate *isolate, const uint8_t *data, size_t size, Delegate *delegate)
uint32_t GetWireFormatVersion() const
V8_WARN_UNUSED_RESULT MaybeLocal< Value > ReadValue(Local< Context > context)
V8_WARN_UNUSED_RESULT bool ReadUint64(uint64_t *value)
void operator=(const ValueDeserializer &)=delete
ValueDeserializer(Isolate *isolate, const uint8_t *data, size_t size)
V8_WARN_UNUSED_RESULT bool ReadDouble(double *value)
void SetSupportsLegacyWireFormat(bool supports_legacy_wire_format)
virtual bool SupportsSharedValues() const
virtual void ThrowDataCloneError(Local< String > message)=0
virtual Maybe< bool > WriteHostObject(Isolate *isolate, Local< Object > object)
virtual Maybe< uint32_t > GetWasmModuleTransferId(Isolate *isolate, Local< WasmModuleObject > module)
virtual Maybe< uint32_t > GetSharedValueId(Isolate *isolate, Local< Value > shared_value)
virtual Maybe< uint32_t > GetSharedArrayBufferId(Isolate *isolate, Local< SharedArrayBuffer > shared_array_buffer)
virtual void FreeBufferMemory(void *buffer)
virtual ~Delegate()=default
virtual void * ReallocateBufferMemory(void *old_buffer, size_t size, size_t *actual_size)
ValueSerializer(Isolate *isolate)
V8_WARN_UNUSED_RESULT std::pair< uint8_t *, size_t > Release()
void TransferArrayBuffer(uint32_t transfer_id, Local< ArrayBuffer > array_buffer)
void SetTreatArrayBufferViewsAsHostObjects(bool mode)
V8_WARN_UNUSED_RESULT Maybe< bool > WriteValue(Local< Context > context, Local< Value > value)
ValueSerializer(const ValueSerializer &)=delete
ValueSerializer(Isolate *isolate, Delegate *delegate)
void WriteDouble(double value)
void WriteUint32(uint32_t value)
void operator=(const ValueSerializer &)=delete
void WriteUint64(uint64_t value)
void WriteRawBytes(const void *source, size_t length)
#define V8_WARN_UNUSED_RESULT