Open Bug 1635176 Opened 4 years ago Updated 2 months ago

Run js ref tests in COOP+COEP headers on treeherder

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

People

(Reporter: tt, Unassigned)

References

(Blocks 1 open bug)

Details

After Bug 1624266, all the js ref tests that use SharedArrayBuffer are expected to fail.

It's because now we use global.crossOriginIsolated to decide if the constructor of the SharedArrayBuffer is exposed or not.

Also, from https://bugzilla.mozilla.org/show_bug.cgi?id=1624266#c43, all these tests are running in a browser on the treeherder and thus break the current check inside the test (for instance: https://searchfox.org/mozilla-central/rev/54f965e51e4f77866bec42737978d40d4c1fdfc5/js/src/tests/test262/built-ins/ArrayBuffer/prototype/byteLength/this-is-sharedarraybuffer.js#1).

A solution is to run these tests with COOP+COEP headers, so that global.crossOriginIsolated would be true and thus the constructor of the SharedArrayBuffer is exposed.

Edited: Once the fix is applied, this change should be reverted as well.

Should this block bug 1606624 and if so, who can work on this before then? It seems if this is not fixed we lose coverage for SharedArrayBuffer, or is that incorrect?

Flags: needinfo?(tcampbell)

Note that most of these tests are still runnable in the shell, so it's not a full "lose". And indeed most daily SpiderMonkey development happens based on shell testing, because the browser setup is often not interestingly different. (But of course that's a double-edged sword, as we often ignore the browser because we know it will end up being tested, if often quite redundantly.)

There is some web-platform-tests coverage for SharedArrayBuffer as well. That's probably sufficient then. The plan is to ship in Fx 78 (without cross-origin isolated).

Given Jeff's reply well go ahead with this.

Flags: needinfo?(tcampbell)
Severity: -- → N/A
Priority: -- → P2
No longer blocks: sm-meta
You need to log in before you can comment on or make changes to this bug.