v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::ValueDeserializer Class Reference

#include <value-serializer.h>

Collaboration diagram for v8::internal::ValueDeserializer:

Public Member Functions

 ValueDeserializer (Isolate *isolate, base::Vector< const uint8_t > data, v8::ValueDeserializer::Delegate *delegate)
 
 ValueDeserializer (Isolate *isolate, const uint8_t *data, size_t size)
 
 ~ValueDeserializer ()
 
 ValueDeserializer (const ValueDeserializer &)=delete
 
ValueDeserializeroperator= (const ValueDeserializer &)=delete
 
Maybe< boolReadHeader () V8_WARN_UNUSED_RESULT
 
uint32_t GetWireFormatVersion () const
 
MaybeDirectHandle< ObjectReadObjectWrapper () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< ObjectReadObjectUsingEntireBufferForLegacyFormat () V8_WARN_UNUSED_RESULT
 
void TransferArrayBuffer (uint32_t transfer_id, DirectHandle< JSArrayBuffer > array_buffer)
 
bool ReadUint32 (uint32_t *value) V8_WARN_UNUSED_RESULT
 
bool ReadUint64 (uint64_t *value) V8_WARN_UNUSED_RESULT
 
bool ReadDouble (double *value) V8_WARN_UNUSED_RESULT
 
bool ReadRawBytes (size_t length, const void **data) V8_WARN_UNUSED_RESULT
 
bool ReadByte (uint8_t *value) V8_WARN_UNUSED_RESULT
 
template<typename T >
Maybe< TReadVarint ()
 
template<typename T >
Maybe< TReadVarintLoop ()
 

Private Member Functions

Maybe< SerializationTagPeekTag () const V8_WARN_UNUSED_RESULT
 
void ConsumeTag (SerializationTag peeked_tag)
 
Maybe< SerializationTagReadTag () V8_WARN_UNUSED_RESULT
 
template<typename T >
V8_INLINE Maybe< TReadVarint () V8_WARN_UNUSED_RESULT
 
template<typename T >
V8_NOINLINE Maybe< TReadVarintLoop () V8_WARN_UNUSED_RESULT
 
template<typename T >
Maybe< TReadZigZag () V8_WARN_UNUSED_RESULT
 
Maybe< double > ReadDouble () V8_WARN_UNUSED_RESULT
 
Maybe< base::Vector< const uint8_t > > ReadRawBytes (size_t size) V8_WARN_UNUSED_RESULT
 
Maybe< base::Vector< const base::uc16 > > ReadRawTwoBytes (size_t size) V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< ObjectReadObject () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< ObjectReadObjectInternal () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< StringReadString () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< BigIntReadBigInt () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< StringReadUtf8String (AllocationType allocation=AllocationType::kYoung) V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< StringReadOneByteString (AllocationType allocation=AllocationType::kYoung) V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< StringReadTwoByteString (AllocationType allocation=AllocationType::kYoung) V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSObjectReadJSObject () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSArrayReadSparseJSArray () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSArrayReadDenseJSArray () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSDateReadJSDate () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSPrimitiveWrapperReadJSPrimitiveWrapper (SerializationTag tag) V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSRegExpReadJSRegExp () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSMapReadJSMap () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSSetReadJSSet () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSArrayBufferReadJSArrayBuffer (bool is_shared, bool is_resizable) V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSArrayBufferReadTransferredJSArrayBuffer () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSArrayBufferViewReadJSArrayBufferView (DirectHandle< JSArrayBuffer > buffer) V8_WARN_UNUSED_RESULT
 
bool ValidateJSArrayBufferViewFlags (Tagged< JSArrayBuffer > buffer, uint32_t serialized_flags, bool &is_length_tracking, bool &is_backed_by_rab) V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< ObjectReadJSError () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< HeapObjectReadSharedObject () V8_WARN_UNUSED_RESULT
 
MaybeDirectHandle< JSObjectReadHostObject () V8_WARN_UNUSED_RESULT
 
Maybe< uint32_t > ReadJSObjectProperties (DirectHandle< JSObject > object, SerializationTag end_tag, bool can_use_transitions)
 
bool HasObjectWithID (uint32_t id)
 
MaybeDirectHandle< JSReceiverGetObjectWithID (uint32_t id)
 
void AddObjectWithID (uint32_t id, DirectHandle< JSReceiver > object)
 

Private Attributes

Isolate *const isolate_
 
v8::ValueDeserializer::Delegate *const delegate_
 
const uint8_t * position_
 
const uint8_t *const end_
 
uint32_t version_ = 0
 
uint32_t next_id_ = 0
 
bool version_13_broken_data_mode_ = false
 
bool suppress_deserialization_errors_ = false
 
IndirectHandle< FixedArrayid_map_
 
MaybeIndirectHandle< SimpleNumberDictionaryarray_buffer_transfer_map_
 
const SharedObjectConveyorHandlesshared_object_conveyor_ = nullptr
 

Detailed Description

Definition at line 203 of file value-serializer.h.

Constructor & Destructor Documentation

◆ ValueDeserializer() [1/3]

v8::internal::ValueDeserializer::ValueDeserializer ( Isolate * isolate,
base::Vector< const uint8_t > data,
v8::ValueDeserializer::Delegate * delegate )

Definition at line 1327 of file value-serializer.cc.

◆ ValueDeserializer() [2/3]

v8::internal::ValueDeserializer::ValueDeserializer ( Isolate * isolate,
const uint8_t * data,
size_t size )

Definition at line 1337 of file value-serializer.cc.

◆ ~ValueDeserializer()

v8::internal::ValueDeserializer::~ValueDeserializer ( )

Definition at line 1346 of file value-serializer.cc.

Here is the call graph for this function:

◆ ValueDeserializer() [3/3]

v8::internal::ValueDeserializer::ValueDeserializer ( const ValueDeserializer & )
delete

Member Function Documentation

◆ AddObjectWithID()

void v8::internal::ValueDeserializer::AddObjectWithID ( uint32_t id,
DirectHandle< JSReceiver > object )
private

Definition at line 2720 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConsumeTag()

void v8::internal::ValueDeserializer::ConsumeTag ( SerializationTag peeked_tag)
private

Definition at line 1381 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetObjectWithID()

MaybeDirectHandle< JSReceiver > v8::internal::ValueDeserializer::GetObjectWithID ( uint32_t id)
private

Definition at line 2710 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWireFormatVersion()

uint32_t v8::internal::ValueDeserializer::GetWireFormatVersion ( ) const
inline

Definition at line 222 of file value-serializer.h.

Here is the caller graph for this function:

◆ HasObjectWithID()

bool v8::internal::ValueDeserializer::HasObjectWithID ( uint32_t id)
private

Definition at line 2705 of file value-serializer.cc.

Here is the caller graph for this function:

◆ operator=()

ValueDeserializer & v8::internal::ValueDeserializer::operator= ( const ValueDeserializer & )
delete

◆ PeekTag()

Maybe< SerializationTag > v8::internal::ValueDeserializer::PeekTag ( ) const
private

Definition at line 1370 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadBigInt()

MaybeDirectHandle< BigInt > v8::internal::ValueDeserializer::ReadBigInt ( )
private

Definition at line 1748 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadByte()

bool v8::internal::ValueDeserializer::ReadByte ( uint8_t * value)

Definition at line 1529 of file value-serializer.cc.

◆ ReadDenseJSArray()

MaybeDirectHandle< JSArray > v8::internal::ValueDeserializer::ReadDenseJSArray ( )
private

Definition at line 1860 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadDouble() [1/2]

Maybe< double > v8::internal::ValueDeserializer::ReadDouble ( )
private
Here is the caller graph for this function:

◆ ReadDouble() [2/2]

bool v8::internal::ValueDeserializer::ReadDouble ( double * value)

Definition at line 1544 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadHeader()

Maybe< bool > v8::internal::ValueDeserializer::ReadHeader ( )

Definition at line 1356 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadHostObject()

MaybeDirectHandle< JSObject > v8::internal::ValueDeserializer::ReadHostObject ( )
private

Definition at line 2489 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSArrayBuffer()

MaybeDirectHandle< JSArrayBuffer > v8::internal::ValueDeserializer::ReadJSArrayBuffer ( bool is_shared,
bool is_resizable )
private

Definition at line 2090 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSArrayBufferView()

MaybeDirectHandle< JSArrayBufferView > v8::internal::ValueDeserializer::ReadJSArrayBufferView ( DirectHandle< JSArrayBuffer > buffer)
private

Definition at line 2194 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSDate()

MaybeDirectHandle< JSDate > v8::internal::ValueDeserializer::ReadJSDate ( )
private

Definition at line 1920 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSError()

MaybeDirectHandle< Object > v8::internal::ValueDeserializer::ReadJSError ( )
private

Definition at line 2293 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSMap()

MaybeDirectHandle< JSMap > v8::internal::ValueDeserializer::ReadJSMap ( )
private

Definition at line 2011 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSObject()

MaybeDirectHandle< JSObject > v8::internal::ValueDeserializer::ReadJSObject ( )
private

Definition at line 1808 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSObjectProperties()

Maybe< uint32_t > v8::internal::ValueDeserializer::ReadJSObjectProperties ( DirectHandle< JSObject > object,
SerializationTag end_tag,
bool can_use_transitions )
private

Definition at line 2529 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSPrimitiveWrapper()

MaybeDirectHandle< JSPrimitiveWrapper > v8::internal::ValueDeserializer::ReadJSPrimitiveWrapper ( SerializationTag tag)
private

Definition at line 1933 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSRegExp()

MaybeDirectHandle< JSRegExp > v8::internal::ValueDeserializer::ReadJSRegExp ( )
private

Definition at line 1984 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadJSSet()

MaybeDirectHandle< JSSet > v8::internal::ValueDeserializer::ReadJSSet ( )
private

Definition at line 2052 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadObject()

MaybeDirectHandle< Object > v8::internal::ValueDeserializer::ReadObject ( )
private

Definition at line 1598 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadObjectInternal()

MaybeDirectHandle< Object > v8::internal::ValueDeserializer::ReadObjectInternal ( )
private

Definition at line 1630 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadObjectUsingEntireBufferForLegacyFormat()

MaybeDirectHandle< Object > v8::internal::ValueDeserializer::ReadObjectUsingEntireBufferForLegacyFormat ( )

Definition at line 2753 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadObjectWrapper()

MaybeDirectHandle< Object > v8::internal::ValueDeserializer::ReadObjectWrapper ( )

Definition at line 1573 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadOneByteString()

MaybeDirectHandle< String > v8::internal::ValueDeserializer::ReadOneByteString ( AllocationType allocation = AllocationType::kYoung)
private

Definition at line 1770 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadRawBytes() [1/2]

bool v8::internal::ValueDeserializer::ReadRawBytes ( size_t length,
const void ** data )

Definition at line 1548 of file value-serializer.cc.

Here is the caller graph for this function:

◆ ReadRawBytes() [2/2]

Maybe< base::Vector< const uint8_t > > v8::internal::ValueDeserializer::ReadRawBytes ( size_t size)
private

Definition at line 1508 of file value-serializer.cc.

Here is the call graph for this function:

◆ ReadRawTwoBytes()

Maybe< base::Vector< const base::uc16 > > v8::internal::ValueDeserializer::ReadRawTwoBytes ( size_t size)
private

Definition at line 1518 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSharedObject()

MaybeDirectHandle< HeapObject > v8::internal::ValueDeserializer::ReadSharedObject ( )
private

Definition at line 2458 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSparseJSArray()

MaybeDirectHandle< JSArray > v8::internal::ValueDeserializer::ReadSparseJSArray ( )
private

Definition at line 1831 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadString()

MaybeDirectHandle< String > v8::internal::ValueDeserializer::ReadString ( )
private

Definition at line 1739 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadTag()

Maybe< SerializationTag > v8::internal::ValueDeserializer::ReadTag ( )
private

Definition at line 1387 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadTransferredJSArrayBuffer()

MaybeDirectHandle< JSArrayBuffer > v8::internal::ValueDeserializer::ReadTransferredJSArrayBuffer ( )
private

Definition at line 2176 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadTwoByteString()

MaybeDirectHandle< String > v8::internal::ValueDeserializer::ReadTwoByteString ( AllocationType allocation = AllocationType::kYoung)
private

Definition at line 1780 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadUint32()

bool v8::internal::ValueDeserializer::ReadUint32 ( uint32_t * value)

Definition at line 1536 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadUint64()

bool v8::internal::ValueDeserializer::ReadUint64 ( uint64_t * value)

Definition at line 1540 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadUtf8String()

MaybeDirectHandle< String > v8::internal::ValueDeserializer::ReadUtf8String ( AllocationType allocation = AllocationType::kYoung)
private

Definition at line 1759 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadVarint() [1/2]

template<typename T >
Maybe< T > v8::internal::ValueDeserializer::ReadVarint ( )

Definition at line 1398 of file value-serializer.cc.

Here is the call graph for this function:

◆ ReadVarint() [2/2]

template<typename T >
V8_INLINE Maybe< T > v8::internal::ValueDeserializer::ReadVarint ( )
private
Here is the caller graph for this function:

◆ ReadVarintLoop() [1/2]

template<typename T >
Maybe< T > v8::internal::ValueDeserializer::ReadVarintLoop ( )

Definition at line 1453 of file value-serializer.cc.

Here is the call graph for this function:

◆ ReadVarintLoop() [2/2]

template<typename T >
V8_NOINLINE Maybe< T > v8::internal::ValueDeserializer::ReadVarintLoop ( )
private
Here is the caller graph for this function:

◆ ReadZigZag()

template<typename T >
Maybe< T > v8::internal::ValueDeserializer::ReadZigZag ( )
private

Definition at line 1480 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TransferArrayBuffer()

void v8::internal::ValueDeserializer::TransferArrayBuffer ( uint32_t transfer_id,
DirectHandle< JSArrayBuffer > array_buffer )

Definition at line 1555 of file value-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ValidateJSArrayBufferViewFlags()

bool v8::internal::ValueDeserializer::ValidateJSArrayBufferViewFlags ( Tagged< JSArrayBuffer > buffer,
uint32_t serialized_flags,
bool & is_length_tracking,
bool & is_backed_by_rab )
private

Definition at line 2266 of file value-serializer.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ array_buffer_transfer_map_

MaybeIndirectHandle<SimpleNumberDictionary> v8::internal::ValueDeserializer::array_buffer_transfer_map_
private

Definition at line 342 of file value-serializer.h.

◆ delegate_

v8::ValueDeserializer::Delegate* const v8::internal::ValueDeserializer::delegate_
private

Definition at line 332 of file value-serializer.h.

◆ end_

const uint8_t* const v8::internal::ValueDeserializer::end_
private

Definition at line 334 of file value-serializer.h.

◆ id_map_

IndirectHandle<FixedArray> v8::internal::ValueDeserializer::id_map_
private

Definition at line 341 of file value-serializer.h.

◆ isolate_

Isolate* const v8::internal::ValueDeserializer::isolate_
private

Definition at line 331 of file value-serializer.h.

◆ next_id_

uint32_t v8::internal::ValueDeserializer::next_id_ = 0
private

Definition at line 336 of file value-serializer.h.

◆ position_

const uint8_t* v8::internal::ValueDeserializer::position_
private

Definition at line 333 of file value-serializer.h.

◆ shared_object_conveyor_

const SharedObjectConveyorHandles* v8::internal::ValueDeserializer::shared_object_conveyor_ = nullptr
private

Definition at line 345 of file value-serializer.h.

◆ suppress_deserialization_errors_

bool v8::internal::ValueDeserializer::suppress_deserialization_errors_ = false
private

Definition at line 338 of file value-serializer.h.

◆ version_

uint32_t v8::internal::ValueDeserializer::version_ = 0
private

Definition at line 335 of file value-serializer.h.

◆ version_13_broken_data_mode_

bool v8::internal::ValueDeserializer::version_13_broken_data_mode_ = false
private

Definition at line 337 of file value-serializer.h.


The documentation for this class was generated from the following files: