When we load a MHTML document, the MHTMLArchives and resources are leaked. This is caused by circular references of the MHTMLArchives, which are ref counted. The problem comes from the fact that MHTML is a flat format that lists frames and resources, when the WebKit Archive class has a tree structure. In order to have any frame have access to any resources, we add all archives and resources to all other archives. That causes the circular references, preventing the archives from going away.
Created attachment 146147 [details] Patch
Comment on attachment 146147 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=146147&action=review > Source/WebCore/loader/archive/Archive.cpp:46 > + for (Vector<RefPtr<Archive> >::iterator it = m_subframeArchives.begin(); it != m_subframeArchives.end(); ++it) This loop should have { } around its body.
Created attachment 146422 [details] Patch
Created attachment 146432 [details] Patch for landing
Comment on attachment 146432 [details] Patch for landing Rejecting attachment 146432 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 ERROR: /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://queues.webkit.org/results/12909471
Adam, Could you R+ CQ+? I tried to land but somehow the reviewer in the log did not get set, sorry. Thanks!
Created attachment 149330 [details] Patch for landing
Comment on attachment 149330 [details] Patch for landing Clearing flags on attachment: 149330 Committed r121191: <http://trac.webkit.org/changeset/121191>
All reviewed patches have been landed. Closing bug.