5#ifndef INCLUDE_V8_WASM_H_
6#define INCLUDE_V8_WASM_H_
25class StreamingDecoder;
33 std::unique_ptr<const uint8_t[]>
buffer;
55 const std::string&
source_url()
const {
return source_url_; }
62 const char* source_url,
size_t url_length);
64 const std::shared_ptr<internal::wasm::NativeModule> native_module_;
65 const std::string source_url_;
79#ifdef V8_ENABLE_CHECKS
86 static void CheckCast(
Value*
object);
114#ifdef V8_ENABLE_CHECKS
121 static void CheckCast(
Value* obj);
132 class WasmStreamingImpl;
153 void Finish(
bool can_use_compiled_module =
true);
185 void SetUrl(
const char* url,
size_t length);
196 std::unique_ptr<WasmStreamingImpl> impl_;
const std::string & source_url() const
MemorySpan< const uint8_t > GetWireBytesRef()
WasmMemoryObject()=delete
Local< ArrayBuffer > Buffer()
static V8_INLINE WasmMemoryObject * Cast(Value *value)
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()
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)
void SetMoreFunctionsCanBeSerializedCallback(std::function< void(CompiledWasmModule)>)
std::unique_ptr< const uint8_t[]> buffer
OwnedBuffer(std::unique_ptr< const uint8_t[]> buffer, size_t size)