TypedArray compartment test isn't testing separate compartments
Categories
(Core :: JavaScript: Standard Library, task, P3)
Tracking
()
People
(Reporter: bthrall, Assigned: bthrall)
References
(Blocks 1 open bug)
Details
Attachments
(1 obsolete file)
The TypedArray of.js test for behavior across compartments doesn't create a new compartment. Apparently, newGlobal() used to create a new compartment by default, but no longer does.
| Assignee | ||
Comment 1•1 year ago
|
||
These tests are apparently from a time when each newGlobal() created a
separate compartment by default, which is no longer the case.
There are many other tests that check calls from "other globals," but it isn't
clear if they are just concerned with the globals or they actually want a
separate compartment.
Updated•1 year ago
|
Comment 2•1 year ago
|
||
Our tests get run with the --tbpl option in CI which runs each one in a bunch of different configurations. At least one if these should have the --more-compartments option, which does make newGlobal create a separate compartment. So, we should still have test coverage here even if it may not test what we expect when run locally with the default options.
| Assignee | ||
Comment 3•1 year ago
|
||
Should I just close this bug, then? It sounds like the problem I thought I saw isn't really a problem.
| Assignee | ||
Comment 4•1 year ago
|
||
:jonco, unless you see some value here, I'm going to close this bug.
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Sorry I missed this needinfo.
If the test is explicitly testing something that requires separate compartments, then it should create a new compartment. Failure to do so means we won't test what we're trying to test unless we run with --tbpl and I assume most people don't run tests locally with this option. Plus it's confusing, hence this bug.
However it's not a super big deal since we do still get the test coverage we want on CI.
Description
•