Changeset 254687 in webkit


Ignore:
Timestamp:
Jan 16, 2020 9:26:21 AM (4 years ago)
Author:
mark.lam@apple.com
Message:

operationToObject() should check for a null errorMessage.
https://bugs.webkit.org/show_bug.cgi?id=206339
<rdar://problem/58449666>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/operationToObject-should-check-for-null-errorMessage.js: Added.

Source/JavaScriptCore:

r224280 introduced operationToObject() with an option to specify a custom error
message. r254252 added a scenario where the passed in error message is null but
did not update operationToObject() to allow for this. This patch adds the
missing null check.

  • dfg/DFGOperations.cpp:
Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r254653 r254687  
     12020-01-16  Mark Lam  <mark.lam@apple.com>
     2
     3        operationToObject() should check for a null errorMessage.
     4        https://bugs.webkit.org/show_bug.cgi?id=206339
     5        <rdar://problem/58449666>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * stress/operationToObject-should-check-for-null-errorMessage.js: Added.
     10
    1112020-01-15  Caitlin Potter <caitp@igalia.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r254681 r254687  
     12020-01-16  Mark Lam  <mark.lam@apple.com>
     2
     3        operationToObject() should check for a null errorMessage.
     4        https://bugs.webkit.org/show_bug.cgi?id=206339
     5        <rdar://problem/58449666>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        r224280 introduced operationToObject() with an option to specify a custom error
     10        message.  r254252 added a scenario where the passed in error message is null but
     11        did not update operationToObject() to allow for this.  This patch adds the
     12        missing null check.
     13
     14        * dfg/DFGOperations.cpp:
     15
    1162020-01-16  Per Arne Vollan  <pvollan@apple.com>
    217
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r254632 r254687  
    456456
    457457    if (UNLIKELY(value.isUndefinedOrNull())) {
    458         if (errorMessage->length()) {
     458        if (errorMessage && errorMessage->length()) {
    459459            throwVMTypeError(globalObject, scope, errorMessage);
    460460            return nullptr;
Note: See TracChangeset for help on using the changeset viewer.