Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
v8::ScriptCompiler::FlexibleExternalSourceStream Class Referenceabstract

#include <v8-script.h>

Inheritance diagram for v8::ScriptCompiler::FlexibleExternalSourceStream:
[legend]
Collaboration diagram for v8::ScriptCompiler::FlexibleExternalSourceStream:
[legend]

Classes

struct  Chunk
 

Public Types

enum class  ChunkEncoding { kOneByte , kTwoByte }
 

Public Member Functions

 ~FlexibleExternalSourceStream () override=default
 
virtual Chunk GetNextChunk ()=0
 
- Public Member Functions inherited from v8::ScriptCompiler::ExternalSourceStreamBase
virtual ~ExternalSourceStreamBase ()=default
 

Detailed Description

For streaming incomplete UTF16-decoded script data to V8 where each chunk can be optionally packed as 1-byte per character if it only contains 1-byte data. The embedder should implement a subclass of this class.

V8 doesn't take ownership of chunks received through this class, so the embedder is responsible for keeping the data alive until this stream is destroyed, and freeing it afterwards.

Member Enumeration Documentation

◆ ChunkEncoding

Enumerator
kOneByte 
kTwoByte 

Constructor & Destructor Documentation

◆ ~FlexibleExternalSourceStream()

v8::ScriptCompiler::FlexibleExternalSourceStream::~FlexibleExternalSourceStream ( )
overridedefault

Member Function Documentation

◆ GetNextChunk()

virtual Chunk v8::ScriptCompiler::FlexibleExternalSourceStream::GetNextChunk ( )
pure virtual

Reads the next chunk from the stream. Returns the length of the chunk in characters. src will point to the data encoding will be set to kOneByte if the chunk is fully 1-byte and packed as 1 byte per character, kTwoByte otherwise.


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