Title: [246765] trunk
Revision
246765
Author
[email protected]
Date
2019-06-24 15:29:00 -0700 (Mon, 24 Jun 2019)

Log Message

Add Array.prototype.{flat,flatMap} to unscopables
https://bugs.webkit.org/show_bug.cgi?id=194322

Patch by Alexey Shvayka <[email protected]> on 2019-06-24
Reviewed by Keith Miller.

JSTests:

* stress/unscopables.js: Fix test.
* test262/expectations.yaml: Mark 2 test cases as passing.

Source/_javascript_Core:

* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):

LayoutTests:

* js/array-unscopables-properties-expected.txt:
* js/script-tests/array-unscopables-properties.js:

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (246764 => 246765)


--- trunk/JSTests/ChangeLog	2019-06-24 22:22:42 UTC (rev 246764)
+++ trunk/JSTests/ChangeLog	2019-06-24 22:29:00 UTC (rev 246765)
@@ -1,3 +1,13 @@
+2019-06-24  Alexey Shvayka  <[email protected]>
+
+        Add Array.prototype.{flat,flatMap} to unscopables
+        https://bugs.webkit.org/show_bug.cgi?id=194322
+
+        Reviewed by Keith Miller.
+
+        * stress/unscopables.js: Fix test.
+        * test262/expectations.yaml: Mark 2 test cases as passing.
+
 2019-06-21  Mark Lam  <[email protected]>
 
         ArraySlice needs to keep the source array alive.

Modified: trunk/JSTests/stress/unscopables.js (246764 => 246765)


--- trunk/JSTests/stress/unscopables.js	2019-06-24 22:22:42 UTC (rev 246764)
+++ trunk/JSTests/stress/unscopables.js	2019-06-24 22:29:00 UTC (rev 246765)
@@ -9,7 +9,7 @@
 
     test(typeof unscopables, "object");
     test(unscopables.__proto__, undefined);
-    test(String(Object.keys(unscopables).sort()), "copyWithin,entries,fill,find,findIndex,includes,keys,values");
+    test(String(Object.keys(unscopables).sort()), "copyWithin,entries,fill,find,findIndex,flat,flatMap,includes,keys,values");
 }());
 
 (function () {

Modified: trunk/JSTests/test262/expectations.yaml (246764 => 246765)


--- trunk/JSTests/test262/expectations.yaml	2019-06-24 22:22:42 UTC (rev 246764)
+++ trunk/JSTests/test262/expectations.yaml	2019-06-24 22:29:00 UTC (rev 246765)
@@ -624,9 +624,6 @@
 test/built-ins/Array/proto-from-ctor-realm.js:
   default: 'Test262Error: Expected SameValue(«», «») to be true'
   strict mode: 'Test262Error: Expected SameValue(«», «») to be true'
-test/built-ins/Array/prototype/Symbol.unscopables/value.js:
-  default: 'Test262Error: `flat` property value Expected SameValue(«undefined», «true») to be true'
-  strict mode: 'Test262Error: `flat` property value Expected SameValue(«undefined», «true») to be true'
 test/built-ins/Array/prototype/filter/target-array-with-non-writable-property.js:
   default: 'TypeError: Attempted to assign to readonly property.'
   strict mode: 'TypeError: Attempted to assign to readonly property.'

Modified: trunk/LayoutTests/ChangeLog (246764 => 246765)


--- trunk/LayoutTests/ChangeLog	2019-06-24 22:22:42 UTC (rev 246764)
+++ trunk/LayoutTests/ChangeLog	2019-06-24 22:29:00 UTC (rev 246765)
@@ -1,3 +1,13 @@
+2019-06-24  Alexey Shvayka  <[email protected]>
+
+        Add Array.prototype.{flat,flatMap} to unscopables
+        https://bugs.webkit.org/show_bug.cgi?id=194322
+
+        Reviewed by Keith Miller.
+
+        * js/array-unscopables-properties-expected.txt:
+        * js/script-tests/array-unscopables-properties.js:
+
 2019-06-24  Jer Noble  <[email protected]>
 
         iOS 12.2 Drawing portrait video to canvas is sideways

Modified: trunk/LayoutTests/js/array-unscopables-properties-expected.txt (246764 => 246765)


--- trunk/LayoutTests/js/array-unscopables-properties-expected.txt	2019-06-24 22:22:42 UTC (rev 246764)
+++ trunk/LayoutTests/js/array-unscopables-properties-expected.txt	2019-06-24 22:29:00 UTC (rev 246765)
@@ -30,6 +30,14 @@
 PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "findIndex").writable is true
 PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "findIndex").enumerable is true
 PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "findIndex").configurable is true
+PASS Array.prototype[Symbol.unscopables]["flat"] is true
+PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "flat").writable is true
+PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "flat").enumerable is true
+PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "flat").configurable is true
+PASS Array.prototype[Symbol.unscopables]["flatMap"] is true
+PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "flatMap").writable is true
+PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "flatMap").enumerable is true
+PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "flatMap").configurable is true
 PASS Array.prototype[Symbol.unscopables]["includes"] is true
 PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "includes").writable is true
 PASS Object.getOwnPropertyDescriptor(Array.prototype[Symbol.unscopables], "includes").enumerable is true

Modified: trunk/LayoutTests/js/script-tests/array-unscopables-properties.js (246764 => 246765)


--- trunk/LayoutTests/js/script-tests/array-unscopables-properties.js	2019-06-24 22:22:42 UTC (rev 246764)
+++ trunk/LayoutTests/js/script-tests/array-unscopables-properties.js	2019-06-24 22:29:00 UTC (rev 246765)
@@ -12,6 +12,8 @@
     "fill",
     "find",
     "findIndex",
+    "flat",
+    "flatMap",
     "includes",
     "keys",
     "values"

Modified: trunk/Source/_javascript_Core/ChangeLog (246764 => 246765)


--- trunk/Source/_javascript_Core/ChangeLog	2019-06-24 22:22:42 UTC (rev 246764)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-06-24 22:29:00 UTC (rev 246765)
@@ -1,3 +1,13 @@
+2019-06-24  Alexey Shvayka  <[email protected]>
+
+        Add Array.prototype.{flat,flatMap} to unscopables
+        https://bugs.webkit.org/show_bug.cgi?id=194322
+
+        Reviewed by Keith Miller.
+
+        * runtime/ArrayPrototype.cpp:
+        (JSC::ArrayPrototype::finishCreation):
+
 2019-06-24  Mark Lam  <[email protected]>
 
         ArraySlice needs to keep the source array alive.

Modified: trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp (246764 => 246765)


--- trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp	2019-06-24 22:22:42 UTC (rev 246764)
+++ trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp	2019-06-24 22:29:00 UTC (rev 246765)
@@ -132,6 +132,8 @@
         &vm.propertyNames->builtinNames().fillPublicName(),
         &vm.propertyNames->builtinNames().findPublicName(),
         &vm.propertyNames->builtinNames().findIndexPublicName(),
+        &vm.propertyNames->builtinNames().flatPublicName(),
+        &vm.propertyNames->builtinNames().flatMapPublicName(),
         &vm.propertyNames->builtinNames().includesPublicName(),
         &vm.propertyNames->builtinNames().keysPublicName(),
         &vm.propertyNames->builtinNames().valuesPublicName()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to