Closed Bug 1644840 Opened 4 years ago Closed 4 years ago

ReferenceError: SharedArrayBuffer is not defined

Categories

(Core :: JavaScript: WebAssembly, defect)

79 Branch
defect

Tracking

()

RESOLVED INVALID
Webcompat Priority ?
Tracking Status
firefox79 --- wontfix

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.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Javascript: WebAssembly
Product: Firefox → Core
Webcompat Priority: --- → ?

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/

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.