5#ifndef INCLUDE_V8_WASM_H_
6#define INCLUDE_V8_WASM_H_
24class StreamingDecoder;
32 std::unique_ptr<const uint8_t[]>
buffer;
54 const std::string&
source_url()
const {
return source_url_; }
61 const char* source_url,
size_t url_length);
63 const std::shared_ptr<internal::wasm::NativeModule> native_module_;
64 const std::string source_url_;
78#ifdef V8_ENABLE_CHECKS
85 static void CheckCast(
Value*
object);
113#ifdef V8_ENABLE_CHECKS
120 static void CheckCast(
Value* obj);
131 class WasmStreamingImpl;
165 void Finish(
bool can_use_compiled_module =
true);
195 void SetUrl(
const char* url,
size_t length);
206 std::unique_ptr<WasmStreamingImpl> impl_;
252 std::shared_ptr<internal::wasm::StreamingDecoder> streaming_decoder_;
const std::string & source_url() const
MemorySpan< const uint8_t > GetWireBytesRef()
WasmMemoryObject()=delete
Local< ArrayBuffer > Buffer()
static V8_INLINE WasmMemoryObject * Cast(Value *value)
void Abort(MaybeLocal< Value > exception)
Local< Promise > GetPromise()
WasmModuleObjectBuilderStreaming(Isolate *isolate)
void OnBytesReceived(const uint8_t *, size_t size)
~WasmModuleObjectBuilderStreaming()=default
static V8_INLINE WasmModuleObject * Cast(Value *value)
WasmModuleObject()=delete
static MaybeLocal< WasmModuleObject > FromCompiledModule(Isolate *isolate, const CompiledWasmModule &)
static MaybeLocal< WasmModuleObject > Compile(Isolate *isolate, MemorySpan< const uint8_t > wire_bytes)
CompiledWasmModule GetCompiledModule()
virtual void OnModuleCompiled(CompiledWasmModule compiled_module)=0
virtual ~Client()=default
void SetClient(std::shared_ptr< Client > client)
void Finish(bool can_use_compiled_module=true)
void Abort(MaybeLocal< Value > exception)
void OnBytesReceived(const uint8_t *bytes, size_t size)
void SetUrl(const char *url, size_t length)
bool SetCompiledModuleBytes(const uint8_t *bytes, size_t size)
static std::shared_ptr< WasmStreaming > Unpack(Isolate *isolate, Local< Value > value)
WasmStreaming(std::unique_ptr< WasmStreamingImpl > impl)
std::unique_ptr< const uint8_t[]> buffer
OwnedBuffer(std::unique_ptr< const uint8_t[]> buffer, size_t size)