Changeset 59170 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
May 11, 2010, 1:38:13 PM (15 years ago)
Author:
[email protected]
Message:

Fixed test failures seen on SnowLeopard buildbot.

  • runtime/JSString.cpp:

(JSC::JSString::replaceCharacter): Don't use size_t and wtf::notFound.
Instead, use the individual types and notFound values of the string APIs
we're using, since they're not necessarily the same in 64bit.

File:
1 edited

Legend:

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

    r59161 r59170  
    108108{
    109109    if (!isRope()) {
    110         size_t matchPosition = m_value.find(character);
    111         if (matchPosition == notFound)
     110        unsigned matchPosition = m_value.find(character);
     111        if (matchPosition == UString::NotFound)
    112112            return JSValue(this);
    113113        return jsString(exec, m_value.substr(0, matchPosition), replacement, m_value.substr(matchPosition + 1));
     
    119119    size_t fiberCount = 0;
    120120    UStringImpl* matchString = 0;
    121     size_t matchPosition = notFound;
     121    int matchPosition = -1;
    122122    for (RopeIterator it(m_other.m_fibers, m_fiberCount); it != end; ++it) {
    123123        ++fiberCount;
     
    127127        UStringImpl* string = *it;
    128128        matchPosition = string->find(character);
    129         if (matchPosition == notFound)
     129        if (matchPosition == -1)
    130130            continue;
    131131        matchString = string;
Note: See TracChangeset for help on using the changeset viewer.