Ignore:
Timestamp:
May 13, 2008, 2:46:47 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Geoffrey Garen.

<rdar://problem/4949018> JavaScriptCore API claims to work with UTF8 strings, but only works
with ASCII strings


  • kjs/ustring.h:
  • kjs/ustring.cpp: (KJS::UString::Rep::createFromUTF8): Added. Implementation adapted from JSStringCreateWithUTF8CString().
  • API/JSStringRef.cpp: (JSStringCreateWithUTF8CString):
  • API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): Use UString::Rep::createFromUTF8().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSClassRef.cpp

    r33038 r33374  
    4040
    4141OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* protoClass)
    42     // FIXME: <rdar://problem/4949018>
    43     : className(definition->className)
     42    : className(UString::Rep::createFromUTF8(definition->className))
    4443    , parentClass(definition->parentClass)
    4544    , prototypeClass(0)
     
    6261        staticValues = new StaticValuesTable();
    6362        while (staticValue->name) {
    64             // FIXME: <rdar://problem/4949018>
    65             staticValues->add(Identifier(staticValue->name).ustring().rep(),
     63            staticValues->add(Identifier(UString::Rep::createFromUTF8(staticValue->name).get()).ustring().rep(),
    6664                              new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes));
    6765            ++staticValue;
     
    7270        staticFunctions = new StaticFunctionsTable();
    7371        while (staticFunction->name) {
    74             // FIXME: <rdar://problem/4949018>
    75             staticFunctions->add(Identifier(staticFunction->name).ustring().rep(),
     72            staticFunctions->add(Identifier(UString::Rep::createFromUTF8(staticFunction->name).get()).ustring().rep(),
    7673                                 new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes));
    7774            ++staticFunction;
Note: See TracChangeset for help on using the changeset viewer.