Changeset 84934 in webkit for trunk/Source/JavaScriptCore/runtime/JSString.cpp
- Timestamp:
- Apr 26, 2011, 11:31:03 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSString.cpp
r84800 r84934 49 49 } 50 50 51 RopeImpl::Fiber currentFiber = m_ other.m_fibers[0];51 RopeImpl::Fiber currentFiber = m_fibers[0]; 52 52 53 53 if ((m_fiberCount > 2) || (RopeImpl::isRope(currentFiber)) 54 || ((m_fiberCount == 2) && (RopeImpl::isRope(m_ other.m_fibers[1])))) {54 || ((m_fiberCount == 2) && (RopeImpl::isRope(m_fibers[1])))) { 55 55 resolveRopeSlowCase(exec, buffer); 56 56 return; … … 64 64 if (m_fiberCount > 1) { 65 65 position += length; 66 currentFiber = m_ other.m_fibers[1];66 currentFiber = m_fibers[1]; 67 67 string = static_cast<StringImpl*>(currentFiber); 68 68 length = string->length(); … … 73 73 ASSERT((buffer + m_length) == position); 74 74 for (unsigned i = 0; i < m_fiberCount; ++i) { 75 RopeImpl::deref(m_ other.m_fibers[i]);76 m_ other.m_fibers[i] = 0;75 RopeImpl::deref(m_fibers[i]); 76 m_fibers[i] = 0; 77 77 } 78 78 m_fiberCount = 0; … … 101 101 RopeImpl::Fiber currentFiber; 102 102 for (unsigned i = 0; i < (m_fiberCount - 1); ++i) 103 workQueue.append(m_ other.m_fibers[i]);104 currentFiber = m_ other.m_fibers[m_fiberCount - 1];103 workQueue.append(m_fibers[i]); 104 currentFiber = m_fibers[m_fiberCount - 1]; 105 105 while (true) { 106 106 if (RopeImpl::isRope(currentFiber)) { … … 123 123 ASSERT(buffer == position); 124 124 for (unsigned i = 0; i < m_fiberCount; ++i) { 125 RopeImpl::deref(m_ other.m_fibers[i]);126 m_ other.m_fibers[i] = 0;125 RopeImpl::deref(m_fibers[i]); 126 m_fibers[i] = 0; 127 127 } 128 128 m_fiberCount = 0; … … 142 142 { 143 143 for (unsigned i = 0; i < m_fiberCount; ++i) { 144 RopeImpl::deref(m_ other.m_fibers[i]);145 m_ other.m_fibers[i] = 0;144 RopeImpl::deref(m_fibers[i]); 145 m_fibers[i] = 0; 146 146 } 147 147 m_fiberCount = 0; … … 170 170 171 171 RopeIterator end; 172 for (RopeIterator it(m_ other.m_fibers.data(), m_fiberCount); it != end; ++it) {172 for (RopeIterator it(m_fibers.data(), m_fiberCount); it != end; ++it) { 173 173 ++fiberCount; 174 174 StringImpl* fiberString = *it; … … 221 221 StringImpl* matchString = 0; 222 222 size_t matchPosition = notFound; 223 for (RopeIterator it(m_ other.m_fibers.data(), m_fiberCount); it != end; ++it) {223 for (RopeIterator it(m_fibers.data(), m_fiberCount); it != end; ++it) { 224 224 ++fiberCount; 225 225 if (matchString) … … 240 240 return throwOutOfMemoryError(exec); 241 241 242 for (RopeIterator it(m_ other.m_fibers.data(), m_fiberCount); it != end; ++it) {242 for (RopeIterator it(m_fibers.data(), m_fiberCount); it != end; ++it) { 243 243 StringImpl* string = *it; 244 244 if (string != matchString) {
Note:
See TracChangeset
for help on using the changeset viewer.