5 #ifndef INCLUDE_V8_WASM_H_
6 #define INCLUDE_V8_WASM_H_
24 class StreamingDecoder;
32 std::unique_ptr<
const uint8_t[]>
buffer;
34 OwnedBuffer(std::unique_ptr<
const uint8_t[]> buffer, size_t size)
54 const std::string&
source_url()
const {
return source_url_; }
58 friend class WasmStreaming;
60 explicit CompiledWasmModule(std::shared_ptr<
internal::
wasm::NativeModule>,
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_;
211 class V8_EXPORT WasmModuleObjectBuilderStreaming
final {
230 WasmModuleObjectBuilderStreaming(
const WasmModuleObjectBuilderStreaming&) =
232 WasmModuleObjectBuilderStreaming(WasmModuleObjectBuilderStreaming&&) =
234 WasmModuleObjectBuilderStreaming& operator=(
235 const WasmModuleObjectBuilderStreaming&) =
delete;
236 WasmModuleObjectBuilderStreaming& operator=(
237 WasmModuleObjectBuilderStreaming&&) =
default;
248 Persistent<Promise, CopyablePersistentTraits<Promise>> promise_;
252 std::shared_ptr<
internal::
wasm::StreamingDecoder> streaming_decoder_;