diff --git a/include/v8.h b/include/v8.h index 692e53b809..7510b9d0c4 100644 --- a/include/v8.h +++ b/include/v8.h @@ -4767,6 +4767,12 @@ class V8_EXPORT WasmStreaming final { */ void SetClient(std::shared_ptr client); + /* + * Sets the UTF-8 encoded source URL for the {Script} object. This must be + * called before {Finish}. + */ + void SetUrl(const char* url, size_t length); + /** * Unpacks a {WasmStreaming} object wrapped in a {Managed} for the embedder. * Since the embedder is on the other side of the API, it cannot unpack the diff --git a/src/wasm/module-compiler.cc b/src/wasm/module-compiler.cc index 2303cd9770..71e25be4b5 100644 --- a/src/wasm/module-compiler.cc +++ b/src/wasm/module-compiler.cc @@ -1518,8 +1518,10 @@ void AsyncCompileJob::PrepareRuntimeObjects() { // Create heap objects for script and module bytes to be stored in the // module object. Asm.js is not compiled asynchronously. const WasmModule* module = native_module_->module(); - Handle