Changeset 276000 in webkit


Ignore:
Timestamp:
Apr 14, 2021 10:53:38 PM (3 years ago)
Author:
mark.lam@apple.com
Message:

Add missing exception check in operationGetPrivateNameOptimize().
https://bugs.webkit.org/show_bug.cgi?id=224592
rdar://76645873

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/suppress-TerminationException-in-operationGetPrivateNameOptimize.js: Added.

Source/JavaScriptCore:

Though the fieldNameValue.toPropertyKey() call in operationGetPrivateNameOptimize()
would not normally throw an exception, it still can throw a TerminationException
because it contains RETURN_IF_EXCEPTION checks.

  • jit/JITOperations.cpp:
Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r275969 r276000  
     12021-04-14  Mark Lam  <mark.lam@apple.com>
     2
     3        Add missing exception check in operationGetPrivateNameOptimize().
     4        https://bugs.webkit.org/show_bug.cgi?id=224592
     5        rdar://76645873
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * stress/suppress-TerminationException-in-operationGetPrivateNameOptimize.js: Added.
     10
    1112021-04-14  Mark Lam  <mark.lam@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r275995 r276000  
     12021-04-14  Mark Lam  <mark.lam@apple.com>
     2
     3        Add missing exception check in operationGetPrivateNameOptimize().
     4        https://bugs.webkit.org/show_bug.cgi?id=224592
     5        rdar://76645873
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        Though the fieldNameValue.toPropertyKey() call in operationGetPrivateNameOptimize()
     10        would not normally throw an exception, it still can throw a TerminationException
     11        because it contains RETURN_IF_EXCEPTION checks.
     12
     13        * jit/JITOperations.cpp:
     14
    1152021-04-14  Yusuke Suzuki  <ysuzuki@apple.com>
    216
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r275995 r276000  
    24052405    if (baseValue.isObject()) {
    24062406        const Identifier fieldName = fieldNameValue.toPropertyKey(globalObject);
    2407         EXCEPTION_ASSERT(!scope.exception());
     2407        EXCEPTION_ASSERT(!scope.exception() || vm.isTerminationException(scope.exception()));
     2408        RETURN_IF_EXCEPTION(scope, encodedJSValue());
    24082409        ASSERT(fieldName.isSymbol());
    24092410
Note: See TracChangeset for help on using the changeset viewer.