#include <v8-script.h>
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 |
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.
|
strong |
|
overridedefault |
|
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.