If it is TopLevelPainter, sCurrentPaintTimeStamp is set as currentTime() in the top of FrameView::paintContents, and is reset as 0 in the bottom of the same function. But, when the FrameView::paintContents returns in the middle, it is not reset as 0, and the value will be not updated anymore. That value is used for MemoryCache and there was a bug that the MemoryCache is not pruned because that value is not reset.
Created attachment 170014 [details] Patch
Comment on attachment 170014 [details] Patch (Not your fault, but why is sCurrentPaintTimeStamp a time instead of just a boolean?) Seems to me that a better fix is to set up isTopLevelPainter after the early returns, rather than adding these two new exit sequences.
For example, sCurrentPaintTimeStamp is referenced with currentPaintTimeStamp() in MemoryCache::::pruneLiveResourcesToSize to measure elapsedTime. void MemoryCache::pruneLiveResourcesToSize(unsigned targetSize) { double currentTime = FrameView::currentPaintTimeStamp(); ... double elapsedTime = currentTime - current->m_lastDecodedAccessTime; if (elapsedTime < cMinDelayBeforeLiveDecodedPrune) return; current->destroyDecodedData(); So, this value need to be a time, and this value should not be initialized before the paintContents is exited. (because it can be accessed by other functions during painting) I considered using some constructor/destructor for initializing it automatically on exit, but It will become too complex.
Created attachment 171793 [details] Patch
Comment on attachment 171793 [details] Patch Clearing flags on attachment: 171793 Committed r133391: <http://trac.webkit.org/changeset/133391>
All reviewed patches have been landed. Closing bug.