Title: [273218] trunk/JSTests
Revision
273218
Author
[email protected]
Date
2021-02-21 04:51:17 -0800 (Sun, 21 Feb 2021)

Log Message

[JSC] Upgrade test262
https://bugs.webkit.org/show_bug.cgi?id=222243

Reviewed by Alexey Shvayka.

* test262/config.yaml:
* test262/expectations.yaml:
* test262/latest-changes-summary.txt:
* test262/test/built-ins/Object/assign/target-is-frozen-accessor-property-set-succeeds.js: Added.
(target1.set foo):
(target2.Object.freeze.set sym):
* test262/test/built-ins/Object/assign/target-is-frozen-data-property-set-throws.js: Added.
* test262/test/built-ins/Object/assign/target-is-non-extensible-existing-accessor-property.js: Added.
(target1.Object.preventExtensions.set foo):
(target2.set sym):
* test262/test/built-ins/Object/assign/target-is-non-extensible-existing-data-property.js: Added.
* test262/test/built-ins/Object/assign/target-is-non-extensible-property-creation-throws.js: Added.
(get bar):
* test262/test/built-ins/Object/assign/target-is-sealed-existing-accessor-property.js: Added.
(target1.Object.seal.set foo):
(target2.set sym):
* test262/test/built-ins/Object/assign/target-is-sealed-existing-data-property.js: Added.
* test262/test/built-ins/Object/assign/target-is-sealed-property-creation-throws.js: Added.
(get bar):
* test262/test/built-ins/Object/freeze/proxy-with-defineProperty-handler.js: Added.
(proxy.new.Proxy.get foo):
(proxy.new.Proxy.set foo):
(set foo.defineProperty):
(set foo):
* test262/test/built-ins/Object/seal/proxy-with-defineProperty-handler.js: Added.
(proxy.new.Proxy.get foo):
(proxy.new.Proxy.set foo):
(set foo.defineProperty):
(set foo):
* test262/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js:
(testWithBigIntTypedArrayConstructors):
* test262/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js:
(testWithBigIntTypedArrayConstructors):
* test262/test/intl402/DateTimeFormat/constructor-no-instanceof.js: Added.
* test262/test/intl402/DateTimeFormat/prototype/format/no-instanceof.js: Added.
* test262/test/intl402/DateTimeFormat/prototype/resolvedOptions/no-instanceof.js: Added.
* test262/test/intl402/NumberFormat/constructor-no-instanceof.js: Added.
* test262/test/intl402/NumberFormat/prototype/format/no-instanceof.js: Added.
* test262/test/intl402/NumberFormat/prototype/resolvedOptions/no-instanceof.js: Added.
* test262/test262-Revision.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (273217 => 273218)


--- trunk/JSTests/ChangeLog	2021-02-21 12:35:49 UTC (rev 273217)
+++ trunk/JSTests/ChangeLog	2021-02-21 12:51:17 UTC (rev 273218)
@@ -1,3 +1,51 @@
+2021-02-21  Yusuke Suzuki  <[email protected]>
+
+        [JSC] Upgrade test262
+        https://bugs.webkit.org/show_bug.cgi?id=222243
+
+        Reviewed by Alexey Shvayka.
+
+        * test262/config.yaml:
+        * test262/expectations.yaml:
+        * test262/latest-changes-summary.txt:
+        * test262/test/built-ins/Object/assign/target-is-frozen-accessor-property-set-succeeds.js: Added.
+        (target1.set foo):
+        (target2.Object.freeze.set sym):
+        * test262/test/built-ins/Object/assign/target-is-frozen-data-property-set-throws.js: Added.
+        * test262/test/built-ins/Object/assign/target-is-non-extensible-existing-accessor-property.js: Added.
+        (target1.Object.preventExtensions.set foo):
+        (target2.set sym):
+        * test262/test/built-ins/Object/assign/target-is-non-extensible-existing-data-property.js: Added.
+        * test262/test/built-ins/Object/assign/target-is-non-extensible-property-creation-throws.js: Added.
+        (get bar):
+        * test262/test/built-ins/Object/assign/target-is-sealed-existing-accessor-property.js: Added.
+        (target1.Object.seal.set foo):
+        (target2.set sym):
+        * test262/test/built-ins/Object/assign/target-is-sealed-existing-data-property.js: Added.
+        * test262/test/built-ins/Object/assign/target-is-sealed-property-creation-throws.js: Added.
+        (get bar):
+        * test262/test/built-ins/Object/freeze/proxy-with-defineProperty-handler.js: Added.
+        (proxy.new.Proxy.get foo):
+        (proxy.new.Proxy.set foo):
+        (set foo.defineProperty):
+        (set foo):
+        * test262/test/built-ins/Object/seal/proxy-with-defineProperty-handler.js: Added.
+        (proxy.new.Proxy.get foo):
+        (proxy.new.Proxy.set foo):
+        (set foo.defineProperty):
+        (set foo):
+        * test262/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js:
+        (testWithBigIntTypedArrayConstructors):
+        * test262/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js:
+        (testWithBigIntTypedArrayConstructors):
+        * test262/test/intl402/DateTimeFormat/constructor-no-instanceof.js: Added.
+        * test262/test/intl402/DateTimeFormat/prototype/format/no-instanceof.js: Added.
+        * test262/test/intl402/DateTimeFormat/prototype/resolvedOptions/no-instanceof.js: Added.
+        * test262/test/intl402/NumberFormat/constructor-no-instanceof.js: Added.
+        * test262/test/intl402/NumberFormat/prototype/format/no-instanceof.js: Added.
+        * test262/test/intl402/NumberFormat/prototype/resolvedOptions/no-instanceof.js: Added.
+        * test262/test262-Revision.txt:
+
 2021-02-19  Michael Saboff  <[email protected]>
 
         Minor fixes to RegExp match indices after r273086

Modified: trunk/JSTests/test262/config.yaml (273217 => 273218)


--- trunk/JSTests/test262/config.yaml	2021-02-21 12:35:49 UTC (rev 273217)
+++ trunk/JSTests/test262/config.yaml	2021-02-21 12:51:17 UTC (rev 273218)
@@ -61,7 +61,16 @@
 
     # New ICU (66~) raises a different failure
     - test/intl402/Locale/constructor-non-iana-canon.js
+    # New ICU (68~) raises a different failure
+    - test/intl402/Locale/likely-subtags.js
+    # Pass only in ICU 68~
+    - test/intl402/Locale/constructor-tag.js
+    - test/intl402/Intl/getCanonicalLocales/unicode-ext-key-with-digit.js
 
+    # ICU canonicalization bug
+    # https://unicode-org.atlassian.net/browse/ICU-21367
+    - test/intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-yes-to-true.js
+
     # Failing because we are building WebKit with very old ICU headers
     - test/intl402/DateTimeFormat/prototype/formatRange/date-same-returns-single-date.js
     - test/intl402/DateTimeFormat/prototype/formatRangeToParts/argument-date-string.js
@@ -197,3 +206,8 @@
     - test/intl402/NumberFormat/prototype/formatToParts/unit.js
     - test/intl402/NumberFormat/prototype/resolvedOptions/compactDisplay.js
     - test/intl402/NumberFormat/style-unit.js
+
+    # These tests become obsolete. Will be updated.
+    # https://github.com/tc39/test262/pull/2952
+    - test/intl402/Segmenter/constructor/constructor/options-toobject.js
+    - test/intl402/Segmenter/constructor/constructor/options-toobject-prototype.js

Modified: trunk/JSTests/test262/expectations.yaml (273217 => 273218)


--- trunk/JSTests/test262/expectations.yaml	2021-02-21 12:35:49 UTC (rev 273217)
+++ trunk/JSTests/test262/expectations.yaml	2021-02-21 12:51:17 UTC (rev 273218)
@@ -835,12 +835,6 @@
 test/built-ins/RegExp/quantifier-integer-limit.js:
   default: 'SyntaxError: Invalid regular _expression_: number too large in {} quantifier'
   strict mode: 'SyntaxError: Invalid regular _expression_: number too large in {} quantifier'
-test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js:
-  default: 'TypeError: Invalid argument type in ToBigInt operation (Testing with BigInt64Array.)'
-  strict mode: 'TypeError: Invalid argument type in ToBigInt operation (Testing with BigInt64Array.)'
-test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js:
-  default: 'Test262Error: throws a TypeError getting a value from the detached buffer Expected a TypeError to be thrown but no exception was thrown at all (Testing with BigInt64Array.)'
-  strict mode: 'Test262Error: throws a TypeError getting a value from the detached buffer Expected a TypeError to be thrown but no exception was thrown at all (Testing with BigInt64Array.)'
 test/intl402/DateTimeFormat/prototype/formatRange/en-US.js:
   default: 'Test262Error: Expected SameValue(«1/3/2019 – 1/5/2019», «1/3/2019 – 1/5/2019») to be true'
   strict mode: 'Test262Error: Expected SameValue(«1/3/2019 – 1/5/2019», «1/3/2019 – 1/5/2019») to be true'
@@ -877,9 +871,6 @@
 test/intl402/Intl/getCanonicalLocales/unicode-ext-canonicalize-subdivision.js:
   default: 'Test262Error: Expected SameValue(«und-NO-u-sd-no23», «und-NO-u-sd-no50») to be true'
   strict mode: 'Test262Error: Expected SameValue(«und-NO-u-sd-no23», «und-NO-u-sd-no50») to be true'
-test/intl402/Intl/getCanonicalLocales/unicode-ext-key-with-digit.js:
-  default: 'Test262Error: Expected SameValue(«en-u-0c-yes», «en-u-0c») to be true'
-  strict mode: 'Test262Error: Expected SameValue(«en-u-0c-yes», «en-u-0c») to be true'
 test/intl402/Locale/constructor-apply-options-canonicalizes-twice.js:
   default: 'Test262Error: Expected SameValue(«ru-Armn-SU», «ru-Armn-AM») to be true'
   strict mode: 'Test262Error: Expected SameValue(«ru-Armn-SU», «ru-Armn-AM») to be true'
@@ -886,9 +877,6 @@
 test/intl402/Locale/constructor-options-region-valid.js:
   default: "Test262Error: new Intl.Locale('en', {region: \"554\"}).toString() returns \"en-NZ\" Expected SameValue(«en-554», «en-NZ») to be true"
   strict mode: "Test262Error: new Intl.Locale('en', {region: \"554\"}).toString() returns \"en-NZ\" Expected SameValue(«en-554», «en-NZ») to be true"
-test/intl402/Locale/constructor-tag.js:
-  default: 'Test262Error: new Intl.Locale("sl-ROZAJ-BISKE-1994").toString() returns "sl-1994-biske-rozaj" Expected SameValue(«sl-rozaj-biske-1994», «sl-1994-biske-rozaj») to be true'
-  strict mode: 'Test262Error: new Intl.Locale("sl-ROZAJ-BISKE-1994").toString() returns "sl-1994-biske-rozaj" Expected SameValue(«sl-rozaj-biske-1994», «sl-1994-biske-rozaj») to be true'
 test/intl402/Locale/extensions-grandfathered.js:
   default: 'Test262Error: Expected SameValue(«fr-Cyrl-FR-u-nu-latn-x-cel-gaulish», «fr-Cyrl-FR-u-nu-latn») to be true'
   strict mode: 'Test262Error: Expected SameValue(«fr-Cyrl-FR-u-nu-latn-x-cel-gaulish», «fr-Cyrl-FR-u-nu-latn») to be true'
@@ -895,9 +883,6 @@
 test/intl402/Locale/likely-subtags-grandfathered.js:
   default: 'Test262Error: Expected SameValue(«xtg-x-cel-gaulish», «xtg») to be true'
   strict mode: 'Test262Error: Expected SameValue(«xtg-x-cel-gaulish», «xtg») to be true'
-test/intl402/Locale/likely-subtags.js:
-  default: 'Test262Error: "en-u-co".maximize() should be "en-Latn-US-u-co" Expected SameValue(«en-Latn-US-u-co-yes», «en-Latn-US-u-co») to be true'
-  strict mode: 'Test262Error: "en-u-co".maximize() should be "en-Latn-US-u-co" Expected SameValue(«en-Latn-US-u-co-yes», «en-Latn-US-u-co») to be true'
 test/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js:
   default: 'Test262Error: "und".minimize() should be "en" Expected SameValue(«en-u-va-posix», «en») to be true'
   strict mode: 'Test262Error: "und".minimize() should be "en" Expected SameValue(«en-u-va-posix», «en») to be true'

Modified: trunk/JSTests/test262/latest-changes-summary.txt (273217 => 273218)


--- trunk/JSTests/test262/latest-changes-summary.txt	2021-02-21 12:35:49 UTC (rev 273217)
+++ trunk/JSTests/test262/latest-changes-summary.txt	2021-02-21 12:51:17 UTC (rev 273218)
@@ -1,44 +1,18 @@
-A test/built-ins/Function/property-order.js
-A test/built-ins/Function/prototype/property-order.js
-A test/built-ins/Object/property-order.js
-A test/built-ins/Promise/all/resolve-element-function-property-order.js
-A test/built-ins/Promise/allSettled/reject-element-function-property-order.js
-A test/built-ins/Promise/allSettled/resolve-element-function-property-order.js
-A test/built-ins/Promise/any/reject-element-function-property-order.js
-A test/built-ins/Promise/executor-function-property-order.js
-A test/built-ins/Promise/property-order.js
-A test/built-ins/Promise/reject-function-property-order.js
-A test/built-ins/Promise/resolve-function-property-order.js
-A test/built-ins/Proxy/property-order.js
-A test/built-ins/Proxy/revocable/revocation-function-property-order.js
-A test/built-ins/ThrowTypeError/property-order.js
-A test/intl402/Collator/prototype/compare/compare-function-property-order.js
-A test/intl402/DateTimeFormat/prototype/format/format-function-property-order.js
-A test/intl402/NumberFormat/prototype/format/format-function-property-order.js
-M test/language/export/escaped-as-export-specifier.js
-M test/language/export/escaped-default.js
-M test/language/export/escaped-from.js
-M test/language/expressions/async-arrow-function/escaped-async-line-terminator.js
-M test/language/expressions/async-arrow-function/escaped-async.js
-M test/language/expressions/async-function/escaped-async.js
-M test/language/expressions/async-generator/escaped-async.js
-M test/language/expressions/dynamic-import/escape-sequence-import.js
-M test/language/expressions/import.meta/syntax/escape-sequence-import.js
-M test/language/expressions/import.meta/syntax/escape-sequence-meta.js
-M test/language/expressions/new.target/escaped-new.js
-M test/language/expressions/new.target/escaped-target.js
-M test/language/expressions/object/method-definition/async-gen-meth-escaped-async.js
-M test/language/expressions/object/method-definition/async-meth-escaped-async.js
-M test/language/expressions/object/method-definition/escaped-get.js
-M test/language/expressions/object/method-definition/escaped-set.js
-M test/language/import/escaped-as-import-specifier.js
-M test/language/import/escaped-as-namespace-import.js
-M test/language/import/escaped-from.js
-M test/language/statements/async-function/escaped-async.js
-M test/language/statements/async-generator/escaped-async.js
-M test/language/statements/class/async-gen-meth-escaped-async.js
-M test/language/statements/class/async-meth-escaped-async.js
-M test/language/statements/class/syntax/escaped-static.js
-M test/language/statements/for-await-of/escaped-of.js
-M test/language/statements/for-of/escaped-of.js
-M test/language/statements/let/syntax/escaped-let.js
\ No newline at end of file
+A test/built-ins/Object/assign/target-is-frozen-accessor-property-set-succeeds.js
+A test/built-ins/Object/assign/target-is-frozen-data-property-set-throws.js
+A test/built-ins/Object/assign/target-is-non-extensible-existing-accessor-property.js
+A test/built-ins/Object/assign/target-is-non-extensible-existing-data-property.js
+A test/built-ins/Object/assign/target-is-non-extensible-property-creation-throws.js
+A test/built-ins/Object/assign/target-is-sealed-existing-accessor-property.js
+A test/built-ins/Object/assign/target-is-sealed-existing-data-property.js
+A test/built-ins/Object/assign/target-is-sealed-property-creation-throws.js
+A test/built-ins/Object/freeze/proxy-with-defineProperty-handler.js
+A test/built-ins/Object/seal/proxy-with-defineProperty-handler.js
+M test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js
+M test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js
+A test/intl402/DateTimeFormat/constructor-no-instanceof.js
+A test/intl402/DateTimeFormat/prototype/format/no-instanceof.js
+A test/intl402/DateTimeFormat/prototype/resolvedOptions/no-instanceof.js
+A test/intl402/NumberFormat/constructor-no-instanceof.js
+A test/intl402/NumberFormat/prototype/format/no-instanceof.js
+A test/intl402/NumberFormat/prototype/resolvedOptions/no-instanceof.js
\ No newline at end of file

Added: trunk/JSTests/test262/test/built-ins/Object/assign/target-is-frozen-accessor-property-set-succeeds.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/assign/target-is-frozen-accessor-property-set-succeeds.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/assign/target-is-frozen-accessor-property-set-succeeds.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,63 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-object.assign
+description: >
+  [[Set]] to accessor property of frozen `target` succeeds.
+info: |
+  SetIntegrityLevel ( O, level )
+
+  [...]
+  3. Let status be ? O.[[PreventExtensions]]().
+  [...]
+  7. Else,
+    a. Assert: level is frozen.
+    b. For each element k of keys, do
+      i. Let currentDesc be ? O.[[GetOwnProperty]](k).
+      ii. If currentDesc is not undefined, then
+        1. If IsAccessorDescriptor(currentDesc) is true, then
+          a. Let desc be the PropertyDescriptor { [[Configurable]]: false }.
+        [...]
+        3. Perform ? DefinePropertyOrThrow(O, k, desc).
+  8. Return true.
+
+  Object.assign ( target, ...sources )
+
+  [...]
+  3. For each element nextSource of sources, do
+    a. If nextSource is neither undefined nor null, then
+      [...]
+      iii. For each element nextKey of keys, do
+        1. Let desc be ? from.[[GetOwnProperty]](nextKey).
+        2. If desc is not undefined and desc.[[Enumerable]] is true, then
+          [...]
+          b. Perform ? Set(to, nextKey, propValue, true).
+
+  OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )
+
+  [...]
+  7. Perform ? Call(setter, Receiver, « V »).
+  8. Return true.
+features: [Symbol]
+---*/
+
+var value1 = 1;
+var target1 = {
+  set foo(val) { value1 = val; },
+};
+
+Object.freeze(target1);
+Object.assign(target1, { foo: 2 });
+assert.sameValue(value1, 2);
+
+
+var sym = Symbol();
+var value2 = 1;
+var target2 = Object.freeze({
+  set [sym](val) { value2 = val; },
+});
+
+Object.freeze(target2);
+Object.assign(target2, { [sym]: 2 });
+assert.sameValue(value2, 2);

Added: trunk/JSTests/test262/test/built-ins/Object/assign/target-is-frozen-data-property-set-throws.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/assign/target-is-frozen-data-property-set-throws.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/assign/target-is-frozen-data-property-set-throws.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,59 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-object.assign
+description: >
+  [[Set]] to data property of frozen `target` fails with TypeError.
+info: |
+  SetIntegrityLevel ( O, level )
+
+  [...]
+  3. Let status be ? O.[[PreventExtensions]]().
+  [...]
+  7. Else,
+    a. Assert: level is frozen.
+    b. For each element k of keys, do
+      i. Let currentDesc be ? O.[[GetOwnProperty]](k).
+      ii. If currentDesc is not undefined, then
+        1. If IsAccessorDescriptor(currentDesc) is true, then
+          [...]
+        2. Else,
+          a. Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
+        3. Perform ? DefinePropertyOrThrow(O, k, desc).
+  8. Return true.
+
+  Object.assign ( target, ...sources )
+
+  [...]
+  3. For each element nextSource of sources, do
+    a. If nextSource is neither undefined nor null, then
+      [...]
+      iii. For each element nextKey of keys, do
+        1. Let desc be ? from.[[GetOwnProperty]](nextKey).
+        2. If desc is not undefined and desc.[[Enumerable]] is true, then
+          [...]
+          b. Perform ? Set(to, nextKey, propValue, true).
+
+  OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )
+
+  [...]
+  3. If IsDataDescriptor(ownDesc) is true, then
+    a. If ownDesc.[[Writable]] is false, return false.
+features: [Symbol, Reflect]
+---*/
+
+var sym = Symbol();
+var target1 = { [sym]: 1 };
+
+Object.freeze(target1);
+assert.throws(TypeError, function() {
+  Object.assign(target1, { [sym]: 1 });
+});
+
+
+var target2 = Object.freeze({ foo: 1 });
+
+assert.throws(TypeError, function() {
+  Object.assign(target2, { foo: 1 });
+});

Added: trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-existing-accessor-property.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-existing-accessor-property.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-existing-accessor-property.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,50 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-object.assign
+description: >
+  [[Set]] to existing accessor property of non-extensible `target` is successful.
+info: |
+  OrdinaryPreventExtensions ( O )
+
+  1. Set O.[[Extensible]] to false.
+
+  Object.assign ( target, ...sources )
+
+  [...]
+  3. For each element nextSource of sources, do
+    a. If nextSource is neither undefined nor null, then
+      [...]
+      iii. For each element nextKey of keys, do
+        1. Let desc be ? from.[[GetOwnProperty]](nextKey).
+        2. If desc is not undefined and desc.[[Enumerable]] is true, then
+          [...]
+          b. Perform ? Set(to, nextKey, propValue, true).
+
+  OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )
+
+  [...]
+  7. Perform ? Call(setter, Receiver, « V »).
+  8. Return true.
+features: [Symbol]
+---*/
+
+var value1 = 1;
+var target1 = Object.preventExtensions({
+  set foo(val) { value1 = val; },
+});
+
+Object.assign(target1, { foo: 2 });
+assert.sameValue(value1, 2);
+
+
+var sym = Symbol();
+var value2 = 1;
+var target2 = {
+  set [sym](val) { value2 = val; },
+};
+
+Object.preventExtensions(target2);
+Object.assign(target2, { [sym]: 2 });
+assert.sameValue(value2, 2);

Added: trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-existing-data-property.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-existing-data-property.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-existing-data-property.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,57 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-object.assign
+description: >
+  [[Set]] to existing data property of non-extensible `target` is successful.
+info: |
+  OrdinaryPreventExtensions ( O )
+
+  1. Set O.[[Extensible]] to false.
+
+  Object.assign ( target, ...sources )
+
+  [...]
+  3. For each element nextSource of sources, do
+    a. If nextSource is neither undefined nor null, then
+      [...]
+      iii. For each element nextKey of keys, do
+        1. Let desc be ? from.[[GetOwnProperty]](nextKey).
+        2. If desc is not undefined and desc.[[Enumerable]] is true, then
+          [...]
+          b. Perform ? Set(to, nextKey, propValue, true).
+
+  OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )
+
+  [...]
+  3. If IsDataDescriptor(ownDesc) is true, then
+    [...]
+    c. Let existingDescriptor be ? Receiver.[[GetOwnProperty]](P).
+    d. If existingDescriptor is not undefined, then
+      [...]
+      iii. Let valueDesc be the PropertyDescriptor { [[Value]]: V }.
+      iv. Return ? Receiver.[[DefineOwnProperty]](P, valueDesc).
+
+  ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )
+
+  [...]
+  9. If O is not undefined, then
+    a. For each field of Desc that is present, set the corresponding attribute
+       of the property named P of object O to the value of the field.
+  10. Return true.
+features: [Symbol]
+---*/
+
+var target1 = Object.preventExtensions({ foo: 1 });
+
+Object.assign(target1, { foo: 2 });
+assert.sameValue(target1.foo, 2);
+
+
+var sym = Symbol();
+var target2 = { [sym]: 1 };
+
+Object.preventExtensions(target2);
+Object.assign(target2, { [sym]: 2 });
+assert.sameValue(target2[sym], 2);

Added: trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-property-creation-throws.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-property-creation-throws.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/assign/target-is-non-extensible-property-creation-throws.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,53 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-object.assign
+description: >
+  [[Set]] to non-existing property of non-extensible `target` fails with TypeError.
+info: |
+  Object.assign ( target, ...sources )
+
+  [...]
+  3. For each element nextSource of sources, do
+    a. If nextSource is neither undefined nor null, then
+      [...]
+      iii. For each element nextKey of keys, do
+        1. Let desc be ? from.[[GetOwnProperty]](nextKey).
+        2. If desc is not undefined and desc.[[Enumerable]] is true, then
+          [...]
+          b. Perform ? Set(to, nextKey, propValue, true).
+
+  OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )
+
+  [...]
+  3. If IsDataDescriptor(ownDesc) is true, then
+    [...]
+    c. Let existingDescriptor be ? Receiver.[[GetOwnProperty]](P).
+    d. If existingDescriptor is not undefined, then
+      [...]
+    e. Else,
+      i. Assert: Receiver does not currently have a property P.
+      ii. Return ? CreateDataProperty(Receiver, P, V).
+
+  ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )
+
+  [...]
+  2. If current is undefined, then
+    a. If extensible is false, return false.
+features: [Symbol]
+---*/
+
+var target1 = Object.preventExtensions({ foo: 1 });
+
+assert.throws(TypeError, function() {
+  Object.assign(target1, { get bar() {} });
+});
+
+
+var target2 = {};
+
+Object.preventExtensions(target2);
+assert.throws(TypeError, function() {
+  Object.assign(target2, { [Symbol()]: 1 });
+});

Added: trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-existing-accessor-property.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-existing-accessor-property.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-existing-accessor-property.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,55 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-object.assign
+description: >
+  [[Set]] to existing accessor property of sealed `target` is successful.
+info: |
+  SetIntegrityLevel ( O, level )
+
+  [...]
+  3. Let status be ? O.[[PreventExtensions]]().
+  [...]
+
+  OrdinaryPreventExtensions ( O )
+
+  1. Set O.[[Extensible]] to false.
+
+  Object.assign ( target, ...sources )
+
+  [...]
+  3. For each element nextSource of sources, do
+    a. If nextSource is neither undefined nor null, then
+      [...]
+      iii. For each element nextKey of keys, do
+        1. Let desc be ? from.[[GetOwnProperty]](nextKey).
+        2. If desc is not undefined and desc.[[Enumerable]] is true, then
+          [...]
+          b. Perform ? Set(to, nextKey, propValue, true).
+
+  OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )
+
+  [...]
+  7. Perform ? Call(setter, Receiver, « V »).
+  8. Return true.
+---*/
+
+var value1 = 1;
+var target1 = Object.seal({
+  set foo(val) { value1 = val; },
+});
+
+Object.assign(target1, { foo: 2 });
+assert.sameValue(value1, 2);
+
+
+var sym = Symbol();
+var value2 = 1;
+var target2 = {
+  set [sym](val) { value2 = val; },
+};
+
+Object.seal(target2);
+Object.assign(target2, { [sym]: 2 });
+assert.sameValue(value2, 2);

Added: trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-existing-data-property.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-existing-data-property.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-existing-data-property.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,62 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-object.assign
+description: >
+  [[Set]] to existing data property of sealed `target` is successful.
+info: |
+  SetIntegrityLevel ( O, level )
+
+  [...]
+  3. Let status be ? O.[[PreventExtensions]]().
+  [...]
+
+  OrdinaryPreventExtensions ( O )
+
+  1. Set O.[[Extensible]] to false.
+
+  Object.assign ( target, ...sources )
+
+  [...]
+  3. For each element nextSource of sources, do
+    a. If nextSource is neither undefined nor null, then
+      [...]
+      iii. For each element nextKey of keys, do
+        1. Let desc be ? from.[[GetOwnProperty]](nextKey).
+        2. If desc is not undefined and desc.[[Enumerable]] is true, then
+          [...]
+          b. Perform ? Set(to, nextKey, propValue, true).
+
+  OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )
+
+  [...]
+  3. If IsDataDescriptor(ownDesc) is true, then
+    [...]
+    c. Let existingDescriptor be ? Receiver.[[GetOwnProperty]](P).
+    d. If existingDescriptor is not undefined, then
+      [...]
+      iii. Let valueDesc be the PropertyDescriptor { [[Value]]: V }.
+      iv. Return ? Receiver.[[DefineOwnProperty]](P, valueDesc).
+
+  ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )
+
+  [...]
+  9. If O is not undefined, then
+    a. For each field of Desc that is present, set the corresponding attribute
+       of the property named P of object O to the value of the field.
+  10. Return true.
+---*/
+
+var target1 = Object.seal({ foo: 1 });
+
+Object.assign(target1, { foo: 2 });
+assert.sameValue(target1.foo, 2);
+
+
+var sym = Symbol();
+var target2 = { [sym]: 1 };
+
+Object.seal(target2);
+Object.assign(target2, { [sym]: 2 });
+assert.sameValue(target2[sym], 2);

Added: trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-property-creation-throws.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-property-creation-throws.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/assign/target-is-sealed-property-creation-throws.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,59 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-object.assign
+description: >
+  [[Set]] to non-existing property of sealed `target` fails with TypeError.
+info: |
+  SetIntegrityLevel ( O, level )
+
+  [...]
+  3. Let status be ? O.[[PreventExtensions]]().
+  [...]
+
+  Object.assign ( target, ...sources )
+
+  [...]
+  3. For each element nextSource of sources, do
+    a. If nextSource is neither undefined nor null, then
+      [...]
+      iii. For each element nextKey of keys, do
+        1. Let desc be ? from.[[GetOwnProperty]](nextKey).
+        2. If desc is not undefined and desc.[[Enumerable]] is true, then
+          [...]
+          b. Perform ? Set(to, nextKey, propValue, true).
+
+  OrdinarySetWithOwnDescriptor ( O, P, V, Receiver, ownDesc )
+
+  [...]
+  3. If IsDataDescriptor(ownDesc) is true, then
+    [...]
+    c. Let existingDescriptor be ? Receiver.[[GetOwnProperty]](P).
+    d. If existingDescriptor is not undefined, then
+      [...]
+    e. Else,
+      i. Assert: Receiver does not currently have a property P.
+      ii. Return ? CreateDataProperty(Receiver, P, V).
+
+  ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )
+
+  [...]
+  2. If current is undefined, then
+    a. If extensible is false, return false.
+features: [Symbol, Reflect]
+---*/
+
+var target1 = Object.seal({ foo: 1 });
+
+assert.throws(TypeError, function() {
+  Object.assign(target1, { get bar() {} });
+});
+
+
+var target2 = {};
+
+Object.seal(target2);
+assert.throws(TypeError, function() {
+  Object.assign(target2, { [Symbol()]: 1 });
+});

Added: trunk/JSTests/test262/test/built-ins/Object/freeze/proxy-with-defineProperty-handler.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/freeze/proxy-with-defineProperty-handler.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/freeze/proxy-with-defineProperty-handler.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,50 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-object.freeze
+description: >
+  [[DefineOwnProperty]] is called with partial descriptor with only [[Configurable]] and
+  [[Writable]] (for data properties only) fields present.
+info: |
+  SetIntegrityLevel ( O, level )
+
+  [...]
+  5. Let keys be ? O.[[OwnPropertyKeys]]().
+  [...]
+  7. Else,
+    a. Assert: level is frozen.
+    b. For each element k of keys, do
+      i. Let currentDesc be ? O.[[GetOwnProperty]](k).
+      ii. If currentDesc is not undefined, then
+        1. If IsAccessorDescriptor(currentDesc) is true, then
+          a. Let desc be the PropertyDescriptor { [[Configurable]]: false }.
+        2. Else,
+          a. Let desc be the PropertyDescriptor { [[Configurable]]: false, [[Writable]]: false }.
+        3. Perform ? DefinePropertyOrThrow(O, k, desc).
+features: [Symbol, Proxy, Reflect]
+---*/
+
+var sym = Symbol();
+var seenDescriptors = {};
+var proxy = new Proxy({
+  [sym]: 1,
+  get foo() {},
+  set foo(_v) {},
+}, {
+  defineProperty: function(target, key, descriptor) {
+    seenDescriptors[key] = descriptor;
+    return Reflect.defineProperty(target, key, descriptor);
+  },
+});
+
+Object.freeze(proxy);
+
+assert.sameValue(seenDescriptors[sym].value, undefined, "value");
+assert.sameValue(seenDescriptors[sym].writable, false, "writable");
+assert.sameValue(seenDescriptors[sym].enumerable, undefined, "enumerable");
+assert.sameValue(seenDescriptors[sym].configurable, false, "configurable");
+
+assert.sameValue(seenDescriptors.foo.get, undefined, "get");
+assert.sameValue(seenDescriptors.foo.set, undefined, "set");
+assert.sameValue(seenDescriptors.foo.enumerable, undefined, "enumerable");
+assert.sameValue(seenDescriptors.foo.configurable, false, "configurable");

Added: trunk/JSTests/test262/test/built-ins/Object/seal/proxy-with-defineProperty-handler.js (0 => 273218)


--- trunk/JSTests/test262/test/built-ins/Object/seal/proxy-with-defineProperty-handler.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/Object/seal/proxy-with-defineProperty-handler.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,41 @@
+// Copyright (C) 2021 Alexey Shvayka. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-object.seal
+description: >
+  [[DefineOwnProperty]] is called with partial descriptor with only [[Configurable]] field present.
+info: |
+  SetIntegrityLevel ( O, level )
+
+  [...]
+  5. Let keys be ? O.[[OwnPropertyKeys]]().
+  6. If level is sealed, then
+    a. For each element k of keys, do
+      i. Perform ? DefinePropertyOrThrow(O, k, PropertyDescriptor { [[Configurable]]: false }).
+features: [Symbol, Proxy, Reflect]
+---*/
+
+var sym = Symbol();
+var seenDescriptors = {};
+var proxy = new Proxy({
+  [sym]: 1,
+  get foo() {},
+  set foo(_v) {},
+}, {
+  defineProperty: function(target, key, descriptor) {
+    seenDescriptors[key] = descriptor;
+    return Reflect.defineProperty(target, key, descriptor);
+  },
+});
+
+Object.seal(proxy);
+
+assert.sameValue(seenDescriptors[sym].value, undefined, "value");
+assert.sameValue(seenDescriptors[sym].writable, undefined, "writable");
+assert.sameValue(seenDescriptors[sym].enumerable, undefined, "enumerable");
+assert.sameValue(seenDescriptors[sym].configurable, false, "configurable");
+
+assert.sameValue(seenDescriptors.foo.get, undefined, "get");
+assert.sameValue(seenDescriptors.foo.set, undefined, "set");
+assert.sameValue(seenDescriptors.foo.enumerable, undefined, "enumerable");
+assert.sameValue(seenDescriptors.foo.configurable, false, "configurable");

Modified: trunk/JSTests/test262/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js (273217 => 273218)


--- trunk/JSTests/test262/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js	2021-02-21 12:35:49 UTC (rev 273217)
+++ trunk/JSTests/test262/test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -1,4 +1,5 @@
 // Copyright (C) 2016 the V8 project authors. All rights reserved.
+// Copyright (C) 2021 Apple Inc. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 esid: sec-%typedarray%.prototype.filter
@@ -22,11 +23,14 @@
   var sample = new TA(2);
 
   sample.filter(function() {
+    var flag = true;
     if (loops === 0) {
       $DETACHBUFFER(sample.buffer);
+    } else {
+      flag = false;
     }
     loops++;
-    return true;
+    return flag;
   });
 
   assert.sameValue(loops, 2);

Modified: trunk/JSTests/test262/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js (273217 => 273218)


--- trunk/JSTests/test262/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js	2021-02-21 12:35:49 UTC (rev 273217)
+++ trunk/JSTests/test262/test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -1,4 +1,5 @@
 // Copyright (C) 2016 the V8 project authors. All rights reserved.
+// Copyright (C) 2021 Apple Inc. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 esid: sec-%typedarray%.prototype.findindex
@@ -36,16 +37,12 @@
 testWithBigIntTypedArrayConstructors(function(TA) {
   var sample = new TA(2);
   var loops = 0;
-  var completion = false;
 
-  assert.throws(TypeError, function() {
-    sample.findIndex(function() {
-      loops++;
+  sample.findIndex(function() {
+    if (loops === 0) {
       $DETACHBUFFER(sample.buffer);
-      completion = true;
-    });
-  }, "throws a TypeError getting a value from the detached buffer");
-
-  assert.sameValue(loops, 1, "predicated is called once");
-  assert(completion, "abrupt completion does not come from DETACHBUFFER");
+    }
+    loops++;
+  });
+  assert.sameValue(loops, 2, "predicate is called once");
 });

Added: trunk/JSTests/test262/test/intl402/DateTimeFormat/constructor-no-instanceof.js (0 => 273218)


--- trunk/JSTests/test262/test/intl402/DateTimeFormat/constructor-no-instanceof.js	                        (rev 0)
+++ trunk/JSTests/test262/test/intl402/DateTimeFormat/constructor-no-instanceof.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,16 @@
+// Copyright (C) 2021 Igalia S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.DateTimeFormat.prototype.resolvedOptions
+description: >
+  Tests that Intl.DateTimeFormat.prototype.resolvedOptions calls
+  OrdinaryHasInstance instead of the instanceof operator which includes a
+  Symbol.hasInstance lookup and call among other things.
+---*/
+
+Object.defineProperty(Intl.DateTimeFormat, Symbol.hasInstance, {
+    get() { throw new Test262Error(); }
+});
+
+Intl.DateTimeFormat();

Added: trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/format/no-instanceof.js (0 => 273218)


--- trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/format/no-instanceof.js	                        (rev 0)
+++ trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/format/no-instanceof.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,18 @@
+// Copyright (C) 2021 Igalia S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.DateTimeFormat.prototype.resolvedOptions
+description: >
+  Tests that Intl.DateTimeFormat.prototype.resolvedOptions calls
+  OrdinaryHasInstance instead of the instanceof operator which includes a
+  Symbol.hasInstance lookup and call among other things.
+---*/
+
+const dtf = new Intl.DateTimeFormat();
+
+Object.defineProperty(Intl.DateTimeFormat, Symbol.hasInstance, {
+    get() { throw new Test262Error(); }
+});
+
+dtf.format;

Added: trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/resolvedOptions/no-instanceof.js (0 => 273218)


--- trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/resolvedOptions/no-instanceof.js	                        (rev 0)
+++ trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/resolvedOptions/no-instanceof.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,18 @@
+// Copyright (C) 2021 Igalia S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.DateTimeFormat.prototype.resolvedOptions
+description: >
+  Tests that Intl.DateTimeFormat.prototype.resolvedOptions calls
+  OrdinaryHasInstance instead of the instanceof operator which includes a
+  Symbol.hasInstance lookup and call among other things.
+---*/
+
+const dtf = new Intl.DateTimeFormat();
+
+Object.defineProperty(Intl.DateTimeFormat, Symbol.hasInstance, {
+    get() { throw new Test262Error(); }
+});
+
+dtf.resolvedOptions();

Added: trunk/JSTests/test262/test/intl402/NumberFormat/constructor-no-instanceof.js (0 => 273218)


--- trunk/JSTests/test262/test/intl402/NumberFormat/constructor-no-instanceof.js	                        (rev 0)
+++ trunk/JSTests/test262/test/intl402/NumberFormat/constructor-no-instanceof.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,16 @@
+// Copyright (C) 2021 Igalia S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.NumberFormat.prototype.resolvedOptions
+description: >
+  Tests that Intl.NumberFormat.prototype.resolvedOptions calls
+  OrdinaryHasInstance instead of the instanceof operator which includes a
+  Symbol.hasInstance lookup and call among other things.
+---*/
+
+Object.defineProperty(Intl.NumberFormat, Symbol.hasInstance, {
+    get() { throw new Test262Error(); }
+});
+
+Intl.NumberFormat();

Added: trunk/JSTests/test262/test/intl402/NumberFormat/prototype/format/no-instanceof.js (0 => 273218)


--- trunk/JSTests/test262/test/intl402/NumberFormat/prototype/format/no-instanceof.js	                        (rev 0)
+++ trunk/JSTests/test262/test/intl402/NumberFormat/prototype/format/no-instanceof.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,18 @@
+// Copyright (C) 2021 Igalia S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.NumberFormat.prototype.resolvedOptions
+description: >
+  Tests that Intl.NumberFormat.prototype.resolvedOptions calls
+  OrdinaryHasInstance instead of the instanceof operator which includes a
+  Symbol.hasInstance lookup and call among other things.
+---*/
+
+const nf = new Intl.NumberFormat();
+
+Object.defineProperty(Intl.NumberFormat, Symbol.hasInstance, {
+    get() { throw new Test262Error(); }
+});
+
+nf.format;

Added: trunk/JSTests/test262/test/intl402/NumberFormat/prototype/resolvedOptions/no-instanceof.js (0 => 273218)


--- trunk/JSTests/test262/test/intl402/NumberFormat/prototype/resolvedOptions/no-instanceof.js	                        (rev 0)
+++ trunk/JSTests/test262/test/intl402/NumberFormat/prototype/resolvedOptions/no-instanceof.js	2021-02-21 12:51:17 UTC (rev 273218)
@@ -0,0 +1,18 @@
+// Copyright (C) 2021 Igalia S.L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-Intl.NumberFormat.prototype.resolvedOptions
+description: >
+  Tests that Intl.NumberFormat.prototype.resolvedOptions calls
+  OrdinaryHasInstance instead of the instanceof operator which includes a
+  Symbol.hasInstance lookup and call among other things.
+---*/
+
+const nf = new Intl.NumberFormat();
+
+Object.defineProperty(Intl.NumberFormat, Symbol.hasInstance, {
+    get() { throw new Test262Error(); }
+});
+
+nf.resolvedOptions();

Modified: trunk/JSTests/test262/test262-Revision.txt (273217 => 273218)


--- trunk/JSTests/test262/test262-Revision.txt	2021-02-21 12:35:49 UTC (rev 273217)
+++ trunk/JSTests/test262/test262-Revision.txt	2021-02-21 12:51:17 UTC (rev 273218)
@@ -1,2 +1,2 @@
 test262 remote url: [email protected]:tc39/test262.git
-test262 revision: 8f904d8cc8be19f4b3d0ed0dd88a657eb03b45ce
+test262 revision: f6034ebe9fb92d4d3dea644b9225bdc18b44a7ab
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to