Title: [239198] trunk
- Revision
- 239198
- Author
- [email protected]
- Date
- 2018-12-13 21:21:35 -0800 (Thu, 13 Dec 2018)
Log Message
Add a missing exception check.
https://bugs.webkit.org/show_bug.cgi?id=192626
<rdar://problem/46662163>
Reviewed by Keith Miller.
JSTests:
* stress/regress-192626.js: Added.
Source/_javascript_Core:
* runtime/ScopedArguments.h:
Modified Paths
Added Paths
Diff
Modified: trunk/JSTests/ChangeLog (239197 => 239198)
--- trunk/JSTests/ChangeLog 2018-12-14 04:39:11 UTC (rev 239197)
+++ trunk/JSTests/ChangeLog 2018-12-14 05:21:35 UTC (rev 239198)
@@ -1,3 +1,13 @@
+2018-12-13 Mark Lam <[email protected]>
+
+ Add a missing exception check.
+ https://bugs.webkit.org/show_bug.cgi?id=192626
+ <rdar://problem/46662163>
+
+ Reviewed by Keith Miller.
+
+ * stress/regress-192626.js: Added.
+
2018-12-13 Caio Lima <[email protected]>
[BigInt] Add ValueDiv into DFG
Added: trunk/JSTests/stress/regress-192626.js (0 => 239198)
--- trunk/JSTests/stress/regress-192626.js (rev 0)
+++ trunk/JSTests/stress/regress-192626.js 2018-12-14 05:21:35 UTC (rev 239198)
@@ -0,0 +1,23 @@
+var a = {};
+
+function foo() {
+ return Array.prototype.splice.apply([], a);
+}
+noInline(foo);
+
+function bar(b) {
+ with({});
+ a = arguments;
+ a.__defineGetter__("length", String.prototype.valueOf);
+ foo();
+}
+
+var exception;
+try {
+ bar();
+} catch (e) {
+ exception = e;
+}
+
+if (exception != "TypeError: Type error")
+ throw "FAIL";
Modified: trunk/Source/_javascript_Core/ChangeLog (239197 => 239198)
--- trunk/Source/_javascript_Core/ChangeLog 2018-12-14 04:39:11 UTC (rev 239197)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-12-14 05:21:35 UTC (rev 239198)
@@ -1,3 +1,13 @@
+2018-12-13 Mark Lam <[email protected]>
+
+ Add a missing exception check.
+ https://bugs.webkit.org/show_bug.cgi?id=192626
+ <rdar://problem/46662163>
+
+ Reviewed by Keith Miller.
+
+ * runtime/ScopedArguments.h:
+
2018-12-13 Saam Barati <[email protected]>
The JSC shell should listen for memory pressure events and respond to them
Modified: trunk/Source/_javascript_Core/runtime/ScopedArguments.h (239197 => 239198)
--- trunk/Source/_javascript_Core/runtime/ScopedArguments.h 2018-12-14 04:39:11 UTC (rev 239197)
+++ trunk/Source/_javascript_Core/runtime/ScopedArguments.h 2018-12-14 05:21:35 UTC (rev 239198)
@@ -74,8 +74,12 @@
uint32_t length(ExecState* exec) const
{
VM& vm = exec->vm();
- if (UNLIKELY(storageHeader().overrodeThings))
- return get(exec, vm.propertyNames->length).toUInt32(exec);
+ auto scope = DECLARE_THROW_SCOPE(vm);
+ if (UNLIKELY(storageHeader().overrodeThings)) {
+ auto value = get(exec, vm.propertyNames->length);
+ RETURN_IF_EXCEPTION(scope, 0);
+ RELEASE_AND_RETURN(scope, value.toUInt32(exec));
+ }
return internalLength();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes