ReferenceError: SharedArrayBuffer is not defined
Categories
(Core :: JavaScript: WebAssembly, defect)
Tracking
()
People
(Reporter: theosib, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:79.0) Gecko/20100101 Firefox/79.0
Steps to reproduce:
I developed a multithreaded WASM app using emscripten. I also made sure that the javascript.options.shared_memory option was set to TRUE.
My em++ build flags include MODULARIZE=1, which might be a factor. I'm not sure.
Actual results:
When I attempt to load the module, I get this error:
ReferenceError: SharedArrayBuffer is not defined
Expected results:
SharedArrayBuffer should be defined. Also, my code works in Chrome.
Comment 1•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 2•4 years ago
|
||
You need to serve the correct COOP and COEP headers with content using shared memory. Chrome will change to require this as well.
Further reading:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/Planned_changes
https://web.dev/coop-coep/
Updated•4 years ago
|
Description
•