Commit c942060
committed
[js/web] Use embedded WASM module in Blob URL workers when wasmBinary is provided
When running inside a Blob URL Web Worker with wasmBinary provided and
numThreads=1, the isSameOrigin check can fail (blob: URLs have opaque
origins in some contexts), causing a fallback to dynamic import of
ort-wasm-simd-threaded.mjs which doesn't exist in that context.
Since wasmBinary is already provided and no worker spawning is needed
(single-threaded), the embedded module can be used directly without
requiring a same-origin check.
This extends the existing pattern from the !scriptSrc case (line 268)
to also apply when scriptSrc is available but fails same-origin checks.
Fixes #273171 parent a70ac2f commit c942060
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| |||
0 commit comments