Ignore:
Timestamp:
Jun 4, 2008, 11:10:15 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Darin.

Fix JSClassCreate to work with old JSCore API threading model.

No change on SunSpider.

  • API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): Since JSClass is constructed without a context, there is no way for it to create Identifiers. Also, added initializeThreading(), just for good measure.
  • API/JSCallbackObjectFunctions.h: (KJS::::getPropertyNames): Make an Identifier out of the string here, because propertyNames.add() needs that.
  • kjs/identifier.cpp:
  • kjs/identifier.h: (KJS::Identifier::equal):
  • kjs/ustring.cpp: (KJS::equal): Moved equal() from identifier.h to ustring.h, because it's not really about Identifiers, and to make it possible to use it from StrHash. Include StrHash.h from ustring.h to avoid having the behavior depend on headers that happen to be included.
  • wtf/StrHash.h: Removed.
  • kjs/ustring.h: Made RefPtr<UString::Rep> use the same default hash as UString::Rep* (it used to default to pointer equality). Moved the whole StrHash header into ustring.h.
  • JavaScriptCore.exp: Export equal() for WebCore use (this StrHash is used in c_class.cpp, jni_class.cpp, and npruntime.cpp).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/ustring.cpp

    r33941 r34361  
    13161316}
    13171317
     1318bool equal(const UString::Rep* r, const UString::Rep* b)
     1319{
     1320    int length = r->len;
     1321    if (length != b->len)
     1322        return false;
     1323    const UChar* d = r->data();
     1324    const UChar* s = b->data();
     1325    for (int i = 0; i != length; ++i)
     1326        if (d[i] != s[i])
     1327            return false;
     1328    return true;
     1329}
     1330
    13181331CString UString::UTF8String(bool strict) const
    13191332{
Note: See TracChangeset for help on using the changeset viewer.