Title: [212791] trunk/Source/_javascript_Core
Revision
212791
Author
[email protected]
Date
2017-02-21 18:29:48 -0800 (Tue, 21 Feb 2017)

Log Message

Add more missing exception checks detected by running marathon.js.
https://bugs.webkit.org/show_bug.cgi?id=168697

Reviewed by Saam Barati.

* runtime/StringPrototype.cpp:
(JSC::replaceUsingRegExpSearch):
(JSC::replaceUsingStringSearch):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (212790 => 212791)


--- trunk/Source/_javascript_Core/ChangeLog	2017-02-22 02:16:35 UTC (rev 212790)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-02-22 02:29:48 UTC (rev 212791)
@@ -1,3 +1,14 @@
+2017-02-21  Mark Lam  <[email protected]>
+
+        Add more missing exception checks detected by running marathon.js.
+        https://bugs.webkit.org/show_bug.cgi?id=168697
+
+        Reviewed by Saam Barati.
+
+        * runtime/StringPrototype.cpp:
+        (JSC::replaceUsingRegExpSearch):
+        (JSC::replaceUsingStringSearch):
+
 2017-02-21  JF Bastien  <[email protected]>
 
         FullCodeOrigin for CodeBlock+CodeOrigin printing

Modified: trunk/Source/_javascript_Core/runtime/StringPrototype.cpp (212790 => 212791)


--- trunk/Source/_javascript_Core/runtime/StringPrototype.cpp	2017-02-22 02:16:35 UTC (rev 212790)
+++ trunk/Source/_javascript_Core/runtime/StringPrototype.cpp	2017-02-22 02:29:48 UTC (rev 212791)
@@ -555,6 +555,7 @@
 
                 cachedCall.setThis(jsUndefined());
                 JSValue jsResult = cachedCall.call();
+                RETURN_IF_EXCEPTION(scope, encodedJSValue());
                 replacements.append(jsResult.toWTFString(exec));
                 RETURN_IF_EXCEPTION(scope, encodedJSValue());
 
@@ -595,6 +596,7 @@
 
                 cachedCall.setThis(jsUndefined());
                 JSValue jsResult = cachedCall.call();
+                RETURN_IF_EXCEPTION(scope, encodedJSValue());
                 replacements.append(jsResult.toWTFString(exec));
                 RETURN_IF_EXCEPTION(scope, encodedJSValue());
 
@@ -734,6 +736,7 @@
     auto scope = DECLARE_THROW_SCOPE(vm);
 
     const String& string = jsString->value(exec);
+    RETURN_IF_EXCEPTION(scope, encodedJSValue());
     String searchString = searchValue.toWTFString(exec);
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to