Modified: trunk/Source/_javascript_Core/ChangeLog (236504 => 236505)
--- trunk/Source/_javascript_Core/ChangeLog 2018-09-26 16:12:34 UTC (rev 236504)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-09-26 16:12:42 UTC (rev 236505)
@@ -1,3 +1,12 @@
+2018-09-26 Yusuke Suzuki <[email protected]>
+
+ Unreviewed, add scope verification handling
+ https://bugs.webkit.org/show_bug.cgi?id=189780
+
+ * runtime/ArrayPrototype.cpp:
+ (JSC::arrayProtoFuncIndexOf):
+ (JSC::arrayProtoFuncLastIndexOf):
+
2018-09-26 Koby Boyango <[email protected]>
[JSC] offlineasm parser should handle CRLF in asm files
Modified: trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp (236504 => 236505)
--- trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp 2018-09-26 16:12:34 UTC (rev 236504)
+++ trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp 2018-09-26 16:12:42 UTC (rev 236505)
@@ -1269,7 +1269,9 @@
JSValue searchElement = exec->argument(0);
if (isJSArray(thisObject)) {
- if (JSValue result = fastIndexOf<IndexOfDirection::Forward>(exec, vm, asArray(thisObject), length, searchElement, index))
+ JSValue result = fastIndexOf<IndexOfDirection::Forward>(exec, vm, asArray(thisObject), length, searchElement, index);
+ RETURN_IF_EXCEPTION(scope, { });
+ if (result)
return JSValue::encode(result);
}
@@ -1318,7 +1320,9 @@
JSValue searchElement = exec->argument(0);
if (isJSArray(thisObject)) {
- if (JSValue result = fastIndexOf<IndexOfDirection::Backward>(exec, vm, asArray(thisObject), length, searchElement, index))
+ JSValue result = fastIndexOf<IndexOfDirection::Backward>(exec, vm, asArray(thisObject), length, searchElement, index);
+ RETURN_IF_EXCEPTION(scope, { });
+ if (result)
return JSValue::encode(result);
}