Ignore:
Timestamp:
Feb 15, 2010, 1:03:45 PM (15 years ago)
Author:
[email protected]
Message:

Bug 34952 - String lengths in UString should be unsigned.
This matches WebCore::StringImpl, and better unifies behaviour throughout JSC.

Reviewed by Geoff Garen.

JavaScriptCore:

  • JavaScriptCore.exp:
  • bytecode/EvalCodeCache.h:
  • runtime/Identifier.cpp:

(JSC::Identifier::equal):

  • runtime/Identifier.h:
  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEscape):

  • runtime/JSONObject.cpp:

(JSC::gap):
(JSC::Stringifier::indent):

  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):

  • runtime/RegExp.cpp:

(JSC::RegExp::match):

  • runtime/StringPrototype.cpp:

(JSC::substituteBackreferencesSlow):
(JSC::stringProtoFuncReplace):
(JSC::stringProtoFuncSplit):
(JSC::trimString):

  • runtime/UString.cpp:

(JSC::UString::UString):
(JSC::UString::from):
(JSC::UString::getCString):
(JSC::UString::ascii):
(JSC::UString::operator[]):
(JSC::UString::toStrictUInt32):
(JSC::UString::find):
(JSC::UString::rfind):
(JSC::UString::substr):
(JSC::operator<):
(JSC::operator>):
(JSC::compare):
(JSC::equal):
(JSC::UString::UTF8String):

  • runtime/UString.h:

(JSC::UString::size):
(JSC::operator==):

  • runtime/UStringImpl.cpp:

(JSC::UStringImpl::create):

  • runtime/UStringImpl.h:

(JSC::UStringImpl::create):
(JSC::UStringImpl::size):
(JSC::UStringImpl::computeHash):
(JSC::UStringImpl::UStringImpl):

WebCore:

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::atob):
(WebCore::JSDOMWindow::btoa):

File:
1 edited

Legend:

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

    r54571 r54789  
    382382    UString str = args.at(0).toString(exec);
    383383    const UChar* c = str.data();
    384     for (int k = 0; k < str.size(); k++, c++) {
     384    for (unsigned k = 0; k < str.size(); k++, c++) {
    385385        int u = c[0];
    386386        if (u > 255) {
Note: See TracChangeset for help on using the changeset viewer.