Changeset 109105 in webkit
- Timestamp:
- Feb 28, 2012 8:02:02 AM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r109059 r109105 1 2012-02-28 Yong Li <yoli@rim.com> 2 3 JSString::resolveRope() should report extra memory cost to the heap. 4 https://bugs.webkit.org/show_bug.cgi?id=79555 5 6 Reviewed by Michael Saboff. 7 8 At the time a JSString is constructed with fibers, it doesn't report 9 extra memory cost, which is reasonable because it hasn't allocate 10 new memory. However when the rope is resolved, it should report meory 11 cost for the new buffer. 12 13 * runtime/JSString.cpp: 14 (JSC::JSString::resolveRope): 15 1 16 2012-02-27 Oliver Hunt <oliver@apple.com> 2 17 -
trunk/Source/JavaScriptCore/runtime/JSString.cpp
r108649 r109105 66 66 if (is8Bit()) { 67 67 LChar* buffer; 68 if (RefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer)) 68 if (RefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer)) { 69 Heap::heap(this)->reportExtraMemoryCost(newImpl->cost()); 69 70 m_value = newImpl.release(); 70 else {71 } else { 71 72 outOfMemory(exec); 72 73 return; … … 93 94 94 95 UChar* buffer; 95 if (RefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer)) 96 if (RefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer)) { 97 Heap::heap(this)->reportExtraMemoryCost(newImpl->cost()); 96 98 m_value = newImpl.release(); 97 else {99 } else { 98 100 outOfMemory(exec); 99 101 return;
Note: See TracChangeset
for help on using the changeset viewer.