mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 21:45:04 +02:00
ShadowRealm: Relax requirements of globalThis available properties test
The intention of this test is to ensure that all built-in properties of the global object are also exposed on the ShadowRealm's global object, without penalizing implementations that don't have all of them implemented. Notably, SharedArrayBuffer may still not be (re-)enabled in all circumstances.
This commit is contained in:
parent
e9f424b6fc
commit
0f35848794
@ -35,7 +35,7 @@ assert.sameValue(
|
|||||||
|
|
||||||
const r = new ShadowRealm();
|
const r = new ShadowRealm();
|
||||||
|
|
||||||
const properties = [
|
let properties = [
|
||||||
'globalThis',
|
'globalThis',
|
||||||
'Infinity',
|
'Infinity',
|
||||||
'NaN',
|
'NaN',
|
||||||
@ -95,6 +95,14 @@ const properties = [
|
|||||||
'Reflect',
|
'Reflect',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// The intention of this test is to ensure that all built-in properties of the
|
||||||
|
// global object are also exposed on the ShadowRealm's global object, without
|
||||||
|
// penalizing implementations that don't have all of them implemented. Notably,
|
||||||
|
// SharedArrayBuffer may still not be (re-)enabled in all circumstances.
|
||||||
|
properties = properties.filter(name => {
|
||||||
|
return name in globalThis;
|
||||||
|
});
|
||||||
|
|
||||||
const available = properties.filter(name => {
|
const available = properties.filter(name => {
|
||||||
// This test is intentionally not using wrapped functions.
|
// This test is intentionally not using wrapped functions.
|
||||||
// This test should not depend on wrapped functions.
|
// This test should not depend on wrapped functions.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user