Changeset 271767 in webkit


Ignore:
Timestamp:
Jan 22, 2021 4:23:06 PM (3 years ago)
Author:
keith_miller@apple.com
Message:

Obj-C API should do correct type checks when using a 32-bit address space
https://bugs.webkit.org/show_bug.cgi?id=220880
<rdar://72370334>

Reviewed by Tadeu Zagallo.

  • API/JSValue.mm:

(-[JSValue isNull]):
(-[JSValue isBoolean]):
(-[JSValue isNumber]):
(-[JSValue isString]):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSValue.mm

    r270665 r271767  
    409409{
    410410#if !CPU(ADDRESS64)
    411     return JSValueIsUndefined([_context JSGlobalContextRef], m_value);
     411    return JSValueIsNull([_context JSGlobalContextRef], m_value);
    412412#else
    413413    return toJS(m_value).isNull();
     
    418418{
    419419#if !CPU(ADDRESS64)
    420     return JSValueIsUndefined([_context JSGlobalContextRef], m_value);
     420    return JSValueIsBoolean([_context JSGlobalContextRef], m_value);
    421421#else
    422422    return toJS(m_value).isBoolean();
     
    427427{
    428428#if !CPU(ADDRESS64)
    429     return JSValueIsUndefined([_context JSGlobalContextRef], m_value);
     429    return JSValueIsNumber([_context JSGlobalContextRef], m_value);
    430430#else
    431431    return toJS(m_value).isNumber();
     
    436436{
    437437#if !CPU(ADDRESS64)
    438     return JSValueIsUndefined([_context JSGlobalContextRef], m_value);
     438    return JSValueIsString([_context JSGlobalContextRef], m_value);
    439439#else
    440440    return toJS(m_value).isString();
  • trunk/Source/JavaScriptCore/ChangeLog

    r271766 r271767  
     12021-01-22  Keith Miller  <keith_miller@apple.com>
     2
     3        Obj-C API should do correct type checks when using a 32-bit address space
     4        https://bugs.webkit.org/show_bug.cgi?id=220880
     5        <rdar://72370334>
     6
     7        Reviewed by Tadeu Zagallo.
     8
     9        * API/JSValue.mm:
     10        (-[JSValue isNull]):
     11        (-[JSValue isBoolean]):
     12        (-[JSValue isNumber]):
     13        (-[JSValue isString]):
     14
    1152021-01-22  Yusuke Suzuki  <ysuzuki@apple.com>
    216
Note: See TracChangeset for help on using the changeset viewer.