5#ifndef INCLUDE_V8_WASM_H_
6#define INCLUDE_V8_WASM_H_
26class StreamingDecoder;
34 std::unique_ptr<const uint8_t[]>
buffer;
63 const char* source_url,
size_t url_length);
80#ifdef V8_ENABLE_CHECKS
87 static void CheckCast(
Value*
object);
115#ifdef V8_ENABLE_CHECKS
122 static void CheckCast(
Value* obj);
134 internal::kWasmWasmStreamingTag;
137 explicit WasmStreaming(std::unique_ptr<WasmStreamingImpl> impl);
145 void OnBytesReceived(
const uint8_t* bytes,
size_t size);
156 void Finish(
bool can_use_compiled_module =
true);
175 bool SetCompiledModuleBytes(
const uint8_t* bytes,
size_t size);
181 void SetMoreFunctionsCanBeSerializedCallback(
188 void SetUrl(
const char* url,
size_t length);
195 static std::shared_ptr<WasmStreaming> Unpack(
Isolate* isolate,
199 std::unique_ptr<WasmStreamingImpl>
impl_;
212#ifdef V8_ENABLE_CHECKS
224 static void CheckCast(
Value*
object);
const std::shared_ptr< internal::wasm::NativeModule > native_module_
const std::string source_url_
const std::string & source_url() const
int32_t WasmFileDescriptor
static V8_INLINE WasmMemoryMapDescriptor * Cast(Value *value)
WasmMemoryMapDescriptor()=delete
static V8_INLINE WasmMemoryObject * Cast(Value *value)
WasmMemoryObject()=delete
WasmModuleObject()=delete
static V8_INLINE WasmModuleObject * Cast(Value *value)
std::unique_ptr< WasmStreamingImpl > impl_
std::unique_ptr< const uint8_t[]> buffer
OwnedBuffer(std::unique_ptr< const uint8_t[]> buffer, size_t size)
std::unique_ptr< ValueMirror > value
std::shared_ptr< const char[]> source_url_