Changeset 231171 in webkit


Ignore:
Timestamp:
Apr 30, 2018, 2:38:26 PM (7 years ago)
Author:
keith_miller@apple.com
Message:

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):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r231166 r231171  
     12018-04-30  Keith Miller  <keith_miller@apple.com>
     2
     3        Remove unneeded exception check from String.fromCharCode
     4        https://bugs.webkit.org/show_bug.cgi?id=185083
     5
     6        Reviewed by Mark Lam.
     7
     8        * runtime/StringConstructor.cpp:
     9        (JSC::stringFromCharCode):
     10
    1112018-04-30  Keith Miller  <keith_miller@apple.com>
    212
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp

    r230980 r231171  
    7878    unsigned length = exec->argumentCount();
    7979    if (LIKELY(length == 1)) {
     80        scope.release();
    8081        unsigned code = exec->uncheckedArgument(0).toUInt32(exec);
    81         RETURN_IF_EXCEPTION(scope, encodedJSValue());
    82         scope.release();
     82        // Not checking for an exception here is ok because jsSingleCharacterString will just fetch an unused string if there's an exception.
    8383        return JSValue::encode(jsSingleCharacterString(exec, code));
    8484    }
Note: See TracChangeset for help on using the changeset viewer.