mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Align detached buffer semantics with web reality, R2
This commit is contained in:
parent
6d49a317ac
commit
7d998a098e
@ -22,7 +22,7 @@ info: |
|
||||
...
|
||||
Let buffer be O.[[ViewedArrayBuffer]].
|
||||
If IsDetachedBuffer(buffer) is true, return false.
|
||||
...
|
||||
|
||||
includes: [testBigIntTypedArray.js, detachArrayBuffer.js]
|
||||
features: [align-detached-buffer-semantics-with-web-reality, BigInt, cross-realm, Reflect, TypedArray]
|
||||
---*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
/*---
|
||||
esid: sec-integer-indexed-exotic-objects-defineownproperty-p-desc
|
||||
description: >
|
||||
Returns false if key is a numeric index and Desc.[[Configurable]] is true
|
||||
Returns true if key is a numeric index and Desc.[[Configurable]] is true
|
||||
info: |
|
||||
9.4.5.3 [[DefineOwnProperty]] ( P, Desc)
|
||||
...
|
||||
@ -11,8 +11,12 @@ info: |
|
||||
a. Let numericIndex be ! CanonicalNumericIndexString(P).
|
||||
b. If numericIndex is not undefined, then
|
||||
...
|
||||
viii. If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is
|
||||
true, return false.
|
||||
If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is false, return false.
|
||||
...
|
||||
|
||||
If Desc has a [[Value]] field, then
|
||||
Let value be Desc.[[Value]].
|
||||
Return ? IntegerIndexedElementSet(O, numericIndex, value).
|
||||
...
|
||||
includes: [testBigIntTypedArray.js]
|
||||
features: [BigInt, Reflect, TypedArray]
|
||||
@ -28,8 +32,8 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
enumerable: true,
|
||||
writable: true
|
||||
}),
|
||||
false,
|
||||
true,
|
||||
"defineProperty's result"
|
||||
);
|
||||
assert.sameValue(sample[0], 0n, "side effect check");
|
||||
assert.sameValue(sample[0], 42n, "side effect check");
|
||||
});
|
||||
|
@ -11,8 +11,10 @@ info: |
|
||||
a. Let numericIndex be ! CanonicalNumericIndexString(P).
|
||||
b. If numericIndex is not undefined, then
|
||||
...
|
||||
v. If Desc has a [[Writable]] field and if Desc.[[Writable]] is false,
|
||||
return false.
|
||||
If Desc has a [[Value]] field, then
|
||||
Let value be Desc.[[Value]].
|
||||
Return ? IntegerIndexedElementSet(O, numericIndex, value).
|
||||
|
||||
...
|
||||
includes: [testBigIntTypedArray.js, propertyHelper.js]
|
||||
features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray]
|
||||
@ -30,7 +32,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(sample[0], 8n, 'The value of sample[0] is 8n');
|
||||
var desc = Object.getOwnPropertyDescriptor(sample, '0');
|
||||
assert.sameValue(desc.value, 8n, 'The value of desc.value is 8n');
|
||||
assert.sameValue(desc.configurable, true, 'The value of desc.configurable is true');
|
||||
assert.sameValue(desc.enumerable, true, 'The value of desc.enumerable is true');
|
||||
assert.sameValue(desc.writable, true, 'The value of desc.writable is true');
|
||||
verifyEnumerable(sample, '0');
|
||||
verifyNotConfigurable(sample, '0');
|
||||
});
|
||||
|
@ -3,7 +3,7 @@
|
||||
/*---
|
||||
esid: sec-integer-indexed-exotic-objects-defineownproperty-p-desc
|
||||
description: >
|
||||
Returns false if key is a numeric index and Desc.[[Configurable]] is true
|
||||
Returns true if key is a numeric index and Desc.[[Configurable]] is true
|
||||
info: |
|
||||
9.4.5.3 [[DefineOwnProperty]] ( P, Desc)
|
||||
...
|
||||
@ -11,8 +11,12 @@ info: |
|
||||
a. Let numericIndex be ! CanonicalNumericIndexString(P).
|
||||
b. If numericIndex is not undefined, then
|
||||
...
|
||||
viii. If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is
|
||||
If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is
|
||||
true, return false.
|
||||
...
|
||||
If Desc has a [[Value]] field, then
|
||||
Let value be Desc.[[Value]].
|
||||
Return ? IntegerIndexedElementSet(O, numericIndex, value).
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
features: [Reflect, TypedArray]
|
||||
@ -28,7 +32,7 @@ testWithTypedArrayConstructors(function(TA) {
|
||||
enumerable: true,
|
||||
writable: true
|
||||
}),
|
||||
false,
|
||||
true,
|
||||
"defineProperty's result"
|
||||
);
|
||||
assert.sameValue(sample[0], 0, "side effect check");
|
||||
|
@ -10,10 +10,15 @@ info: |
|
||||
3. If Type(P) is String, then
|
||||
a. Let numericIndex be ! CanonicalNumericIndexString(P).
|
||||
b. If numericIndex is not undefined, then
|
||||
...
|
||||
x. If Desc has a [[Writable]] field and if Desc.[[Writable]] is false,
|
||||
return false.
|
||||
...
|
||||
If ! IsValidIntegerIndex(O, numericIndex) is false, return false.
|
||||
If IsAccessorDescriptor(Desc) is true, return false.
|
||||
If Desc has a [[Configurable]] field and if Desc.[[Configurable]] is false, return false.
|
||||
If Desc has an [[Enumerable]] field and if Desc.[[Enumerable]] is false, return false.
|
||||
If Desc has a [[Writable]] field and if Desc.[[Writable]] is false, return false.
|
||||
If Desc has a [[Value]] field, then
|
||||
Let value be Desc.[[Value]].
|
||||
Return ? IntegerIndexedElementSet(O, numericIndex, value).
|
||||
|
||||
includes: [testTypedArray.js, propertyHelper.js]
|
||||
features: [Reflect, TypedArray]
|
||||
---*/
|
||||
@ -24,7 +29,7 @@ testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(
|
||||
Reflect.defineProperty(sample, "0", {
|
||||
value: 8,
|
||||
configurable: false,
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user