5#ifndef INCLUDE_V8_VALUE_SERIALIZER_H_
6#define INCLUDE_V8_VALUE_SERIALIZER_H_
23class SharedArrayBuffer;
25class WasmModuleObject;
29struct ScriptStreamingData;
30class SharedObjectConveyorHandles;
31class ValueDeserializer;
58 std::unique_ptr<internal::SharedObjectConveyorHandles> private_;
143 size_t* actual_size);
208 PrivateData* private_;
233 Isolate* isolate, uint32_t transfer_id);
240 Isolate* isolate, uint32_t clone_id);
311 PrivateData* private_;
SharedValueConveyor(SharedValueConveyor &&) noexcept
virtual const SharedValueConveyor * GetSharedValueConveyor(Isolate *isolate)
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 void ThrowDataCloneError(Local< String > message)=0
virtual Maybe< bool > WriteHostObject(Isolate *isolate, Local< Object > object)
virtual bool AdoptSharedValueConveyor(Isolate *isolate, SharedValueConveyor &&conveyor)
virtual bool HasCustomHostObject(Isolate *isolate)
virtual Maybe< uint32_t > GetWasmModuleTransferId(Isolate *isolate, Local< WasmModuleObject > module)
virtual Maybe< uint32_t > GetSharedArrayBufferId(Isolate *isolate, Local< SharedArrayBuffer > shared_array_buffer)
virtual void FreeBufferMemory(void *buffer)
virtual Maybe< bool > IsHostObject(Isolate *isolate, Local< Object > object)
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