Ignore:
Timestamp:
Apr 2, 2015, 5:09:42 PM (10 years ago)
Author:
[email protected]
Message:

JavaScriptCore API should support type checking for Array and Date
https://bugs.webkit.org/show_bug.cgi?id=143324

Reviewed by Darin Adler, Sam Weinig, Dan Bernstein.

  • API/JSValue.h:
  • API/JSValue.mm:

(-[JSValue isArray]):
(-[JSValue isDate]): Added an ObjC API.

  • API/JSValueRef.cpp:

(JSValueIsArray):
(JSValueIsDate):

  • API/JSValueRef.h: Added a C API.
  • API/WebKitAvailability.h: Brought our availability macros up to date

and fixed a harmless bug where "10_10" translated to "10.0".

  • API/tests/testapi.c:

(main): Added a test and corrected a pre-existing leak.

  • API/tests/testapi.mm:

(testObjectiveCAPI): Added a test.

File:
1 edited

Legend:

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

    r181485 r182297  
    355355{
    356356    return JSValueIsObject([_context JSGlobalContextRef], m_value);
     357}
     358
     359- (BOOL)isArray
     360{
     361    return JSValueIsArray([_context JSGlobalContextRef], m_value);
     362}
     363
     364- (BOOL)isDate
     365{
     366    return JSValueIsDate([_context JSGlobalContextRef], m_value);
    357367}
    358368
Note: See TracChangeset for help on using the changeset viewer.