Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion js/web/lib/wasm/wasm-utils-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ export const importWasmModule = async (
}
} else {
// if the script source is available, we can check if it is from the same origin.
useEmbeddedModule = isSameOrigin(scriptSrc);
// Also use the embedded module when wasmBinary is provided and single-threaded (eg. Blob URL workers
// where isSameOrigin fails but no file resolution or worker spawning is needed).
useEmbeddedModule = isSameOrigin(scriptSrc) || (isWasmOverridden && !isMultiThreaded);
}
}
if (useEmbeddedModule) {
Expand Down