Title: [234402] releases/WebKitGTK/webkit-2.20/Source/_javascript_Core
Revision
234402
Author
[email protected]
Date
2018-07-31 00:00:29 -0700 (Tue, 31 Jul 2018)

Log Message

Merge r231171 - Remove unneeded exception check from String.fromCharCode
https://bugs.webkit.org/show_bug.cgi?id=185083

Reviewed by Mark Lam.

* runtime/StringConstructor.cpp:
(JSC::stringFromCharCode):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog (234401 => 234402)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog	2018-07-31 00:48:50 UTC (rev 234401)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog	2018-07-31 07:00:29 UTC (rev 234402)
@@ -1,3 +1,13 @@
+2018-04-30  Keith Miller  <[email protected]>
+
+        Remove unneeded exception check from String.fromCharCode
+        https://bugs.webkit.org/show_bug.cgi?id=185083
+
+        Reviewed by Mark Lam.
+
+        * runtime/StringConstructor.cpp:
+        (JSC::stringFromCharCode):
+
 2018-06-15  Michael Catanzaro  <[email protected]>
 
         Unreviewed, rolling out r232816.

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/StringConstructor.cpp (234401 => 234402)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/StringConstructor.cpp	2018-07-31 00:48:50 UTC (rev 234401)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/StringConstructor.cpp	2018-07-31 07:00:29 UTC (rev 234402)
@@ -77,9 +77,9 @@
 
     unsigned length = exec->argumentCount();
     if (LIKELY(length == 1)) {
+        scope.release();
         unsigned code = exec->uncheckedArgument(0).toUInt32(exec);
-        RETURN_IF_EXCEPTION(scope, encodedJSValue());
-        scope.release();
+        // Not checking for an exception here is ok because jsSingleCharacterString will just fetch an unused string if there's an exception.
         return JSValue::encode(jsSingleCharacterString(exec, code));
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to