mirror of https://github.com/tc39/test262.git
Coverage: Object.seal instances of all built-in constructors. Fixes gh-2845
This commit is contained in:
parent
d6732b2e28
commit
9d345b6a85
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an AggregateError object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new AggregateError([]));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an ArrayBuffer object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new ArrayBuffer());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an ArrowFunction object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new (Object.getPrototypeOf(() => {}).constructor)());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an AsyncArrowFunction object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new (Object.getPrototypeOf(async () => {}).constructor)());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an AsyncFunction object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new (Object.getPrototypeOf(async function() {}).constructor)());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an AsyncGeneratorFunction object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new (Object.getPrototypeOf(async function * () {}).constructor)());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a BigInt64Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new BigInt64Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a BigUint64Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new BigUint64Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Boolean object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Boolean());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a DataView object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new DataView(new ArrayBuffer(4)));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Date object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Date());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Error object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Error());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an EvalError object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new EvalError());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a FinalizationRegistry object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new FinalizationRegistry(() => {}));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Float32Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Float32Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Float64Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Float64Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Function object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Function());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a GeneratorFunction object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new (Object.getPrototypeOf(function * () {}).constructor)());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Int16Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Int16Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Int32Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Int32Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Int8Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Int8Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Map object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Map());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Number object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Number(1));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Object object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Object());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Promise object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Promise(() => {}));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Proxy object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Proxy({}, {}));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a RangeError object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new RangeError());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a ReferenceError object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new ReferenceError());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a RegExp object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new RegExp(""));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Set object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Set());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a SharedArrayBuffer object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new SharedArrayBuffer(4));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a String object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new String(""));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a Symbol object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(Symbol());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a SyntaxError object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new SyntaxError());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a TypeError object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new TypeError());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Uint16Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Uint16Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Uint32Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Uint32Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Uint8Array object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Uint8Array());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an Uint8ClampedArray object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new Uint8ClampedArray());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal an URIError object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new URIError());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a WeakMap object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new WeakMap());
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a WeakRef object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new WeakRef({}));
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-object.seal
|
||||
description: >
|
||||
Object.seal a WeakSet object
|
||||
info: |
|
||||
If Type(O) is not Object, return O.
|
||||
Let status be ? SetIntegrityLevel(O, sealed).
|
||||
|
||||
SetIntegrityLevel ( O, level )
|
||||
|
||||
Assert: Type(O) is Object.
|
||||
Assert: level is either sealed or frozen.
|
||||
Let status be ? O.[[PreventExtensions]]().
|
||||
If status is false, return false.
|
||||
Let keys be ? O.[[OwnPropertyKeys]]().
|
||||
If level is sealed, then
|
||||
For each element k of keys, do
|
||||
Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
|
||||
Else,
|
||||
Assert: level is frozen.
|
||||
For each element k of keys, do
|
||||
Let currentDesc be ? O.[[GetOwnProperty]](k).
|
||||
If currentDesc is not undefined, then
|
||||
If IsAccessorDescriptor(currentDesc) is true, then
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false }.
|
||||
Else,
|
||||
Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
|
||||
Perform ? DefinePropertyOrThrow(O, k, desc).
|
||||
Return true.
|
||||
|
||||
---*/
|
||||
|
||||
Object.seal(new WeakSet());
|
Loading…
Reference in New Issue