Ignore:
Timestamp:
Feb 19, 2016, 2:39:34 AM (9 years ago)
Author:
[email protected]
Message:

Add isJSString(JSCell*) variant to avoid Cell->JSValue->Cell conversion
https://bugs.webkit.org/show_bug.cgi?id=154442

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-02-19
Reviewed by Saam Barati.

  • runtime/JSString.h:

(JSC::isJSString):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSString.h

    r194509 r196810  
    6363JSRopeString* jsStringBuilder(VM*);
    6464
     65bool isJSString(JSCell*);
    6566bool isJSString(JSValue);
    6667JSString* asString(JSValue);
     
    647648}
    648649
     650inline bool isJSString(JSCell* cell)
     651{
     652    return cell->type() == StringType;
     653}
     654
    649655inline bool isJSString(JSValue v)
    650656{
    651     return v.isCell() && v.asCell()->type() == StringType;
     657    return v.isCell() && isJSString(v.asCell());
    652658}
    653659
Note: See TracChangeset for help on using the changeset viewer.