mirror of
https://github.com/tc39/test262.git
synced 2025-11-13 10:19:42 +01:00
* Add tests for prototype realm inference * Add tests for miscellaneous realm concerns * Add tests for realm of spec-created Errors In some cases, Error objects produced by the specification are observable from ECMAScript code. Among these cases, some are further differentiated in that they occur outside of any built-in function and may be triggered through syntactic production directly. The current realm record is commonly interpreted incorrectly under these circumstances. Add tests asserting that the expected realm record is used when constructing such Error objects. * Add tests for realm use in ArraySpeciesCreate * Add tests for function realm retrieval * Add tests for cross-realm behaviors of Symbols * Add tests for GetValue and PutValue * Add tests for realm of spec-created Arrays In some cases, Arrays produced by CreateArrayFromList are observable from ECMAScript code. Among these cases, two occur outside of any built-in function and may be triggered through syntactic production directly. The current realm record is commonly interpreted incorrectly under these circumstances. Add tests asserting that the expected realm record is used when constructing arrays. * Add test for spec-created object * fixup! Add tests for realm of spec-created Errors * fixup! Add tests for realm of spec-created Errors * fixup! Add tests for prototype realm inference * fixup! Add tests for miscellaneous realm concerns
32 lines
869 B
JavaScript
32 lines
869 B
JavaScript
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
esid: sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc
|
|
es6id: 9.5.6
|
|
description: >
|
|
Throw a TypeError exception if Desc is not configurable and target is not
|
|
extensible, and trap result is true (honoring the realm of the current
|
|
execution context).
|
|
info: |
|
|
[[DefineOwnProperty]] (P, Desc)
|
|
|
|
...
|
|
19. If targetDesc is undefined, then
|
|
a. If extensibleTarget is false, throw a TypeError exception.
|
|
...
|
|
---*/
|
|
|
|
var OProxy = $.createRealm().global.Proxy;
|
|
var target = Object.create(null);
|
|
var p = new OProxy(target, {
|
|
defineProperty: function() {
|
|
return true;
|
|
}
|
|
});
|
|
|
|
Object.preventExtensions(target);
|
|
|
|
assert.throws(TypeError, function() {
|
|
p.prop = null;
|
|
});
|