v8  7.8.279(node12.19.0)
V8 is Google's open source JavaScript engine
SharedArrayBuffer::Contents Class Reference

#include <v8.h>

Public Types

using Allocator = v8::ArrayBuffer::Allocator
 
using DeleterCallback = void(*)(void *buffer, size_t length, void *info)
 

Public Member Functions

 Contents ()
 
void * AllocationBase () const
 
size_t AllocationLength () const
 
Allocator::AllocationMode AllocationMode () const
 
void * Data () const
 
size_t ByteLength () const
 
DeleterCallback Deleter () const
 
void * DeleterData () const
 

Friends

class SharedArrayBuffer
 

Detailed Description

The contents of an |SharedArrayBuffer|. Externalization of |SharedArrayBuffer| returns an instance of this class, populated, with a pointer to data and byte length.

The Data pointer of ArrayBuffer::Contents must be freed using the provided deleter, which will call ArrayBuffer::Allocator::Free if the buffer was allocated with ArraryBuffer::Allocator::Allocate.

This API is experimental and may change significantly.

Definition at line 5209 of file v8.h.

Member Typedef Documentation

◆ Allocator

Definition at line 5211 of file v8.h.

◆ DeleterCallback

using DeleterCallback = void (*)(void* buffer, size_t length, void* info)

Definition at line 5212 of file v8.h.

Constructor & Destructor Documentation

◆ Contents()

Contents ( )
inline

Definition at line 5214 of file v8.h.

References ArrayBuffer::Allocator::kNormal.

Member Function Documentation

◆ AllocationBase()

void* AllocationBase ( ) const
inline

Definition at line 5223 of file v8.h.

◆ AllocationLength()

size_t AllocationLength ( ) const
inline

Definition at line 5224 of file v8.h.

◆ AllocationMode()

Allocator::AllocationMode AllocationMode ( ) const
inline

Definition at line 5225 of file v8.h.

◆ ByteLength()

size_t ByteLength ( ) const
inline

Definition at line 5230 of file v8.h.

◆ Data()

void* Data ( ) const
inline

Definition at line 5229 of file v8.h.

◆ Deleter()

DeleterCallback Deleter ( ) const
inline

Definition at line 5231 of file v8.h.

◆ DeleterData()

void* DeleterData ( ) const
inline

Definition at line 5232 of file v8.h.

Friends And Related Function Documentation

◆ SharedArrayBuffer

friend class SharedArrayBuffer
friend

Definition at line 5248 of file v8.h.


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