Changeset 181411 in webkit
- Timestamp:
- Mar 11, 2015, 3:32:19 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
-
JavaScriptCore/API/JSBase.cpp (modified) (1 diff)
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/runtime/SparseArrayValueMap.cpp (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/Modules/mediasource/SourceBuffer.cpp (modified) (1 diff)
-
WebCore/bindings/js/JSDocumentCustom.cpp (modified) (1 diff)
-
WebCore/bindings/js/JSImageDataCustom.cpp (modified) (1 diff)
-
WebCore/bindings/js/JSNodeListCustom.cpp (modified) (1 diff)
-
WebCore/dom/CollectionIndexCache.cpp (modified) (1 diff)
-
WebCore/html/HTMLCanvasElement.cpp (modified) (1 diff)
-
WebCore/html/HTMLImageLoader.cpp (modified) (1 diff)
-
WebCore/html/HTMLMediaElement.cpp (modified) (1 diff)
-
WebCore/xml/XMLHttpRequest.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSBase.cpp
r181407 r181411 141 141 JSLockHolder locker(exec); 142 142 143 // FIXME: switch to deprecatedReportExtraMemory. 144 // https://bugs.webkit.org/show_bug.cgi?id=142593 145 exec->vm().heap.reportExtraMemoryAllocated(size); 143 exec->vm().heap.deprecatedReportExtraMemory(size); 146 144 } 147 145 -
trunk/Source/JavaScriptCore/ChangeLog
r181407 r181411 1 2015-03-11 Geoffrey Garen <ggaren@apple.com> 2 3 Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth 4 https://bugs.webkit.org/show_bug.cgi?id=142593 5 6 Reviewed by Andreas Kling. 7 8 Adopt deprecatedReportExtraMemory as a short-term fix for runaway 9 memory growth in these cases where we have not adopted 10 reportExtraMemoryVisited. 11 12 Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited. 13 That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595. 14 15 * API/JSBase.cpp: 16 (JSReportExtraMemoryCost): 17 * runtime/SparseArrayValueMap.cpp: 18 (JSC::SparseArrayValueMap::add): 19 1 20 2015-03-11 Geoffrey Garen <ggaren@apple.com> 2 21 -
trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp
r181407 r181411 81 81 size_t capacity = m_map.capacity(); 82 82 if (capacity != m_reportedCapacity) { 83 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.84 // https://bugs.webkit.org/show_bug.cgi?id=14259 385 Heap::heap(array)-> reportExtraMemoryAllocated((capacity - m_reportedCapacity) * (sizeof(unsigned) + sizeof(WriteBarrier<Unknown>)));83 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 84 // https://bugs.webkit.org/show_bug.cgi?id=142595 85 Heap::heap(array)->deprecatedReportExtraMemory((capacity - m_reportedCapacity) * (sizeof(unsigned) + sizeof(WriteBarrier<Unknown>))); 86 86 m_reportedCapacity = capacity; 87 87 } -
trunk/Source/WebCore/ChangeLog
r181409 r181411 1 2015-03-11 Geoffrey Garen <ggaren@apple.com> 2 3 Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth 4 https://bugs.webkit.org/show_bug.cgi?id=142593 5 6 Reviewed by Andreas Kling. 7 8 Adopt deprecatedReportExtraMemory as a short-term fix for runaway 9 memory growth in these cases where we have not adopted 10 reportExtraMemoryVisited. 11 12 Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited. 13 That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595. 14 15 Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/, 16 which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live. 17 18 * Modules/mediasource/SourceBuffer.cpp: 19 (WebCore::SourceBuffer::reportExtraMemoryAllocated): 20 * bindings/js/JSDocumentCustom.cpp: 21 (WebCore::toJS): 22 * bindings/js/JSImageDataCustom.cpp: 23 (WebCore::toJS): 24 * bindings/js/JSNodeListCustom.cpp: 25 (WebCore::createWrapper): 26 * dom/CollectionIndexCache.cpp: 27 (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache): 28 * html/HTMLCanvasElement.cpp: 29 (WebCore::HTMLCanvasElement::createImageBuffer): 30 * html/HTMLImageLoader.cpp: 31 (WebCore::HTMLImageLoader::imageChanged): 32 * html/HTMLMediaElement.cpp: 33 (WebCore::HTMLMediaElement::parseAttribute): 34 * xml/XMLHttpRequest.cpp: 35 (WebCore::XMLHttpRequest::dropProtection): 36 1 37 2015-03-10 Andy Estes <aestes@apple.com> 2 38 -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp
r181407 r181411 2000 2000 JSC::JSLockHolder lock(scriptExecutionContext()->vm()); 2001 2001 if (extraMemoryCostDelta > 0) { 2002 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.2003 // https://bugs.webkit.org/show_bug.cgi?id=14259 32004 scriptExecutionContext()->vm().heap. reportExtraMemoryAllocated(extraMemoryCostDelta);2002 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 2003 // https://bugs.webkit.org/show_bug.cgi?id=142595 2004 scriptExecutionContext()->vm().heap.deprecatedReportExtraMemory(extraMemoryCostDelta); 2005 2005 } 2006 2006 } -
trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp
r181407 r181411 110 110 nodeCount++; 111 111 112 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.113 // https://bugs.webkit.org/show_bug.cgi?id=14259 3114 exec->heap()-> reportExtraMemoryAllocated(nodeCount * sizeof(Node));112 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 113 // https://bugs.webkit.org/show_bug.cgi?id=142595 114 exec->heap()->deprecatedReportExtraMemory(nodeCount * sizeof(Node)); 115 115 } 116 116 -
trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp
r181407 r181411 48 48 Identifier dataName(exec, "data"); 49 49 wrapper->putDirect(exec->vm(), dataName, toJS(exec, globalObject, imageData->data()), DontDelete | ReadOnly); 50 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.51 // https://bugs.webkit.org/show_bug.cgi?id=14259 352 exec->heap()-> reportExtraMemoryAllocated(imageData->data()->length());50 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 51 // https://bugs.webkit.org/show_bug.cgi?id=142595 52 exec->heap()->deprecatedReportExtraMemory(imageData->data()->length()); 53 53 54 54 return wrapper; -
trunk/Source/WebCore/bindings/js/JSNodeListCustom.cpp
r181407 r181411 63 63 JSC::JSValue createWrapper(JSDOMGlobalObject& globalObject, NodeList& nodeList) 64 64 { 65 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.66 // https://bugs.webkit.org/show_bug.cgi?id=14259 367 globalObject.vm().heap. reportExtraMemoryAllocated(nodeList.memoryCost());65 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 66 // https://bugs.webkit.org/show_bug.cgi?id=142595 67 globalObject.vm().heap.deprecatedReportExtraMemory(nodeList.memoryCost()); 68 68 return createNewWrapper<JSNodeList>(&globalObject, &nodeList); 69 69 } -
trunk/Source/WebCore/dom/CollectionIndexCache.cpp
r181407 r181411 35 35 JSC::VM& vm = JSDOMWindowBase::commonVM(); 36 36 JSC::JSLockHolder lock(vm); 37 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.38 // https://bugs.webkit.org/show_bug.cgi?id=14259 339 vm.heap. reportExtraMemoryAllocated(cost);37 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 38 // https://bugs.webkit.org/show_bug.cgi?id=142595 39 vm.heap.deprecatedReportExtraMemory(cost); 40 40 } 41 41 -
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
r181407 r181411 577 577 JSC::JSLockHolder lock(scriptExecutionContext()->vm()); 578 578 size_t numBytes = 4 * m_imageBuffer->internalSize().width() * m_imageBuffer->internalSize().height(); 579 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.580 // https://bugs.webkit.org/show_bug.cgi?id=14259 3581 scriptExecutionContext()->vm().heap. reportExtraMemoryAllocated(numBytes);579 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 580 // https://bugs.webkit.org/show_bug.cgi?id=142595 581 scriptExecutionContext()->vm().heap.deprecatedReportExtraMemory(numBytes); 582 582 583 583 #if USE(IOSURFACE_CANVAS_BACKING_STORE) || ENABLE(ACCELERATED_2D_CANVAS) -
trunk/Source/WebCore/html/HTMLImageLoader.cpp
r181407 r181411 89 89 JSC::VM& vm = JSDOMWindowBase::commonVM(); 90 90 JSC::JSLockHolder lock(vm); 91 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.92 // https://bugs.webkit.org/show_bug.cgi?id=14259 393 vm.heap. reportExtraMemoryAllocated(cachedImage->encodedSize());91 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 92 // https://bugs.webkit.org/show_bug.cgi?id=142595 93 vm.heap.deprecatedReportExtraMemory(cachedImage->encodedSize()); 94 94 } 95 95 } -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r181407 r181411 638 638 639 639 if (extraMemoryCostDelta > 0) { 640 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.641 // https://bugs.webkit.org/show_bug.cgi?id=14259 3642 vm.heap. reportExtraMemoryAllocated(extraMemoryCostDelta);640 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 641 // https://bugs.webkit.org/show_bug.cgi?id=142595 642 vm.heap.deprecatedReportExtraMemory(extraMemoryCostDelta); 643 643 } 644 644 } -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r181407 r181411 914 914 JSC::VM& vm = scriptExecutionContext()->vm(); 915 915 JSC::JSLockHolder lock(vm); 916 // FIXME: Switch to deprecatedReportExtraMemory, or adopt reportExtraMemoryVisited.917 // https://bugs.webkit.org/show_bug.cgi?id=14259 3918 vm.heap. reportExtraMemoryAllocated(m_responseBuilder.length() * 2);916 // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. 917 // https://bugs.webkit.org/show_bug.cgi?id=142595 918 vm.heap.deprecatedReportExtraMemory(m_responseBuilder.length() * 2); 919 919 920 920 unsetPendingActivity(this);
Note:
See TracChangeset
for help on using the changeset viewer.