Changeset 270700 in webkit


Ignore:
Timestamp:
Dec 11, 2020 12:10:12 PM (3 years ago)
Author:
Tadeu Zagallo
Message:

REGRESSION (r270665): testapi failing on CLoop bot
https://bugs.webkit.org/show_bug.cgi?id=219787

Reviewed by Mark Lam.

The API has to special case the empty JSValue as null.

  • API/JSValueRef.cpp:

(JSValueGetType):
(JSValueIsNull):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSValueRef.cpp

    r270665 r270700  
    6565    if (jsValue.isUndefined())
    6666        return kJSTypeUndefined;
    67     if (jsValue.isNull())
     67    if (!jsValue || jsValue.isNull())
    6868        return kJSTypeNull;
    6969    if (jsValue.isBoolean())
     
    106106    return toJS(globalObject, value).isNull();
    107107#else
    108     return toJS(value).isNull();
     108    return !value || toJS(value).isNull();
    109109#endif
    110110}
  • trunk/Source/JavaScriptCore/ChangeLog

    r270690 r270700  
     12020-12-11  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        REGRESSION (r270665): testapi failing on CLoop bot
     4        https://bugs.webkit.org/show_bug.cgi?id=219787
     5
     6        Reviewed by Mark Lam.
     7
     8        The API has to special case the empty JSValue as null.
     9
     10        * API/JSValueRef.cpp:
     11        (JSValueGetType):
     12        (JSValueIsNull):
     13
    1142020-12-11  Don Olmstead  <don.olmstead@sony.com>
    215
Note: See TracChangeset for help on using the changeset viewer.