Bug 25491 - WebFrame leak when a subframe removes itself
Summary: WebFrame leak when a subframe removes itself
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2009-04-30 13:15 PDT by Darin Adler
Modified: 2009-05-02 12:59 PDT (History)
1 user (show)

See Also:


Attachments
main document (53 bytes, text/html)
2009-04-30 13:22 PDT, Darin Adler
no flags Details
subframe (103 bytes, text/html)
2009-04-30 13:23 PDT, Darin Adler
no flags Details
patch (6.65 KB, patch)
2009-04-30 13:23 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2009-04-30 13:15:10 PDT
Steps to reproduce: 
1. Download attached main.html and subframe.html.
2. Open main.html is a debug Safari build.
3. Close it.

Results: an alert says that a WebFrame leaked.
Comment 1 Darin Adler 2009-04-30 13:15:33 PDT
<rdar://problem/6833859>
Comment 2 Darin Adler 2009-04-30 13:22:55 PDT
Created attachment 29916 [details]
main document
Comment 3 Darin Adler 2009-04-30 13:23:07 PDT
Created attachment 29917 [details]
subframe
Comment 4 Darin Adler 2009-04-30 13:23:24 PDT
Created attachment 29918 [details]
patch
Comment 5 Brady Eidson 2009-04-30 15:59:19 PDT
Comment on attachment 29918 [details]
patch

As with all FrameLoader voodoo, I'm not 100% sure on this one - but it seems quite safe and reasonable, and fixes the bug.

I think it's a shame the FrameLoadDelegate dumping that DRT does doesn't make an effort to dump the error for didFailLoadWithError, but that enhancement is outside the scope of this patch.

r+
Comment 6 Darin Adler 2009-04-30 17:07:51 PDT
http://trac.webkit.org/changeset/43106
Comment 8 Darin Adler 2009-05-02 11:51:44 PDT
Comment on attachment 29918 [details]
patch

Clearing review flag since this caused regression test failures.
Comment 9 Darin Adler 2009-05-02 12:59:31 PDT
http://trac.webkit.org/changeset/43148