Title: [235540] trunk
- Revision
- 235540
- Author
- [email protected]
- Date
- 2018-08-31 01:40:35 -0700 (Fri, 31 Aug 2018)
Log Message
Add missing exception check in arrayProtoFuncLastIndexOf().
https://bugs.webkit.org/show_bug.cgi?id=189184
<rdar://problem/39785959>
Reviewed by Yusuke Suzuki.
JSTests:
* stress/regress-189184.js: Added.
Source/_javascript_Core:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncLastIndexOf):
Modified Paths
Added Paths
Diff
Modified: trunk/JSTests/ChangeLog (235539 => 235540)
--- trunk/JSTests/ChangeLog 2018-08-31 07:49:32 UTC (rev 235539)
+++ trunk/JSTests/ChangeLog 2018-08-31 08:40:35 UTC (rev 235540)
@@ -1,3 +1,13 @@
+2018-08-31 Mark Lam <[email protected]>
+
+ Add missing exception check in arrayProtoFuncLastIndexOf().
+ https://bugs.webkit.org/show_bug.cgi?id=189184
+ <rdar://problem/39785959>
+
+ Reviewed by Yusuke Suzuki.
+
+ * stress/regress-189184.js: Added.
+
2018-08-31 Saam barati <[email protected]>
convertToRegExpMatchFastGlobal must use KnownString as the child use kind
Added: trunk/JSTests/stress/regress-189184.js (0 => 235540)
--- trunk/JSTests/stress/regress-189184.js (rev 0)
+++ trunk/JSTests/stress/regress-189184.js 2018-08-31 08:40:35 UTC (rev 235540)
@@ -0,0 +1,3 @@
+//@ runDefault
+// This test passes if it does not crash.
+['a'+0].lastIndexOf('a0');
Modified: trunk/Source/_javascript_Core/ChangeLog (235539 => 235540)
--- trunk/Source/_javascript_Core/ChangeLog 2018-08-31 07:49:32 UTC (rev 235539)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-08-31 08:40:35 UTC (rev 235540)
@@ -1,3 +1,14 @@
+2018-08-31 Mark Lam <[email protected]>
+
+ Add missing exception check in arrayProtoFuncLastIndexOf().
+ https://bugs.webkit.org/show_bug.cgi?id=189184
+ <rdar://problem/39785959>
+
+ Reviewed by Yusuke Suzuki.
+
+ * runtime/ArrayPrototype.cpp:
+ (JSC::arrayProtoFuncLastIndexOf):
+
2018-08-31 Saam barati <[email protected]>
convertToRegExpMatchFastGlobal must use KnownString as the child use kind
Modified: trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp (235539 => 235540)
--- trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp 2018-08-31 07:49:32 UTC (rev 235539)
+++ trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp 2018-08-31 08:40:35 UTC (rev 235540)
@@ -1215,9 +1215,10 @@
RETURN_IF_EXCEPTION(scope, encodedJSValue());
if (!e)
continue;
- if (JSValue::strictEqual(exec, searchElement, e))
+ bool isEqual = JSValue::strictEqual(exec, searchElement, e);
+ RETURN_IF_EXCEPTION(scope, encodedJSValue());
+ if (isEqual)
return JSValue::encode(jsNumber(index));
- RETURN_IF_EXCEPTION(scope, encodedJSValue());
} while (index--);
return JSValue::encode(jsNumber(-1));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes