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/JSONObject.cpp

    r54571 r54789  
    136136static inline UString gap(ExecState* exec, JSValue space)
    137137{
    138     const int maxGapLength = 10;
     138    const unsigned maxGapLength = 10;
    139139    space = unwrapBoxedPrimitive(exec, space);
    140140
     
    457457{
    458458    // Use a single shared string, m_repeatedGap, so we don't keep allocating new ones as we indent and unindent.
    459     int newSize = m_indent.size() + m_gap.size();
     459    unsigned newSize = m_indent.size() + m_gap.size();
    460460    if (newSize > m_repeatedGap.size())
    461461        m_repeatedGap = makeString(m_repeatedGap, m_gap);
Note: See TracChangeset for help on using the changeset viewer.