Title: [253137] trunk
Revision
253137
Author
[email protected]
Date
2019-12-04 19:20:16 -0800 (Wed, 04 Dec 2019)

Log Message

Fix missing exception check in ArrayPrototype's fastJoin().
https://bugs.webkit.org/show_bug.cgi?id=204868
<rdar://problem/57516684>

Reviewed by Saam Barati.

JSTests:

* stress/missing-exception-check-in-array-prototype-fastJoin.js: Added.

Source/_javascript_Core:

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

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (253136 => 253137)


--- trunk/JSTests/ChangeLog	2019-12-05 01:37:01 UTC (rev 253136)
+++ trunk/JSTests/ChangeLog	2019-12-05 03:20:16 UTC (rev 253137)
@@ -1,3 +1,13 @@
+2019-12-04  Mark Lam  <[email protected]>
+
+        Fix missing exception check in ArrayPrototype's fastJoin().
+        https://bugs.webkit.org/show_bug.cgi?id=204868
+        <rdar://problem/57516684>
+
+        Reviewed by Saam Barati.
+
+        * stress/missing-exception-check-in-array-prototype-fastJoin.js: Added.
+
 2019-12-04  Yusuke Suzuki  <[email protected]>
 
         Unreviewed, rolling out r252416, vimeo does not work

Added: trunk/JSTests/stress/missing-exception-check-in-array-prototype-fastJoin.js (0 => 253137)


--- trunk/JSTests/stress/missing-exception-check-in-array-prototype-fastJoin.js	                        (rev 0)
+++ trunk/JSTests/stress/missing-exception-check-in-array-prototype-fastJoin.js	2019-12-05 03:20:16 UTC (rev 253137)
@@ -0,0 +1,11 @@
+//@ runDefault
+
+try {
+    const s = (10).toLocaleString().padEnd(2**31-1, 'aa');
+    RegExp([s]);
+} catch (e) {
+    exception = e;
+}
+
+if (exception != "Error: Out of memory")
+    throw "FAILED";

Modified: trunk/Source/_javascript_Core/ChangeLog (253136 => 253137)


--- trunk/Source/_javascript_Core/ChangeLog	2019-12-05 01:37:01 UTC (rev 253136)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-12-05 03:20:16 UTC (rev 253137)
@@ -1,5 +1,16 @@
 2019-12-04  Mark Lam  <[email protected]>
 
+        Fix missing exception check in ArrayPrototype's fastJoin().
+        https://bugs.webkit.org/show_bug.cgi?id=204868
+        <rdar://problem/57516684>
+
+        Reviewed by Saam Barati.
+
+        * runtime/ArrayPrototype.cpp:
+        (JSC::fastJoin):
+
+2019-12-04  Mark Lam  <[email protected]>
+
         Fix a broken assertion in GetByStatus::computeForStubInfoWithoutExitSiteFeedback().
         https://bugs.webkit.org/show_bug.cgi?id=204866
 

Modified: trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp (253136 => 253137)


--- trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp	2019-12-05 01:37:01 UTC (rev 253136)
+++ trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp	2019-12-05 03:20:16 UTC (rev 253137)
@@ -490,6 +490,7 @@
             if (JSValue value = data[i].get()) {
                 if (!joiner.appendWithoutSideEffects(globalObject, value))
                     goto generalCase;
+                RETURN_IF_EXCEPTION(scope, { });
             } else {
                 if (sawHoles)
                     *sawHoles = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to