Ignore:
Timestamp:
Mar 25, 2010, 11:20:17 AM (15 years ago)
Author:
[email protected]
Message:

Bug 36611 - Cleanup JSC::CString
Rename CString::c_str() -> CString::data(), CString::size() -> CString::length(),
remove UString::getCString() (all uses are wrong, should use UString::UTF8String()).

Reviewed by Geoff Garen.

JavaScriptCore:

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::printUnaryOp):
(JSC::CodeBlock::printBinaryOp):
(JSC::CodeBlock::printConditionalJump):
(JSC::CodeBlock::printGetByIdOp):
(JSC::CodeBlock::printPutByIdOp):
(JSC::printGlobalResolveInfo):
(JSC::printStructureStubInfo):
(JSC::CodeBlock::printStructure):
(JSC::CodeBlock::printStructures):
(JSC::CodeBlock::dump):

  • jsc.cpp:

(functionPrint):
(functionDebug):
(runInteractive):
(fillBufferWithContentsOfFile):

  • profiler/CallIdentifier.h:

(JSC::CallIdentifier::c_str):

  • profiler/Profile.cpp:

(JSC::Profile::debugPrintDataSampleStyle):

  • profiler/ProfileNode.cpp:

(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):

  • runtime/DateConversion.cpp:

(JSC::parseDate):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::encode):
(JSC::globalFuncJSCPrint):

  • runtime/UString.cpp:

(JSC::operator==):
(JSC::UString::toDouble):

  • runtime/UString.h:

(JSC::CString::length):
(JSC::CString::data):

WebCore:

  • bridge/NP_jsobject.cpp:

(_NPN_Enumerate):

  • bridge/c/c_utility.cpp:

(JSC::Bindings::convertValueToNPVariant):

  • bridge/jni/jsc/JNIBridgeJSC.cpp:

(JavaField::valueFromInstance):
(JavaField::setValueToInstance):

  • bridge/jni/jsc/JavaInstanceJSC.cpp:

(JavaInstance::invokeMethod):

  • bridge/jni/jsc/JavaStringJSC.h:

(JSC::Bindings::JavaStringImpl::UTF8String):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp

    r55093 r56560  
    5656    UString str = args.at(0).toString(exec);
    5757    CString cstr = str.UTF8String(true);
    58     if (!cstr.c_str())
     58    if (!cstr.data())
    5959        return throwError(exec, URIError, "String contained an illegal UTF-16 sequence.");
    6060
    6161    JSStringBuilder builder;
    62     const char* p = cstr.c_str();
    63     for (size_t k = 0; k < cstr.size(); k++, p++) {
     62    const char* p = cstr.data();
     63    for (size_t k = 0; k < cstr.length(); k++, p++) {
    6464        char c = *p;
    6565        if (c && strchr(doNotEscape, c))
     
    431431JSValue JSC_HOST_CALL globalFuncJSCPrint(ExecState* exec, JSObject*, JSValue, const ArgList& args)
    432432{
    433     CStringBuffer string;
    434     args.at(0).toString(exec).getCString(string);
     433    CString string = args.at(0).toString(exec).UTF8String();
    435434    puts(string.data());
    436435    return jsUndefined();
Note: See TracChangeset for help on using the changeset viewer.