Open Bug 694689 Opened 13 years ago Updated 2 years ago

iframe compartment doesn't go away after removing iframe until tab is closed

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
Windows XP
defect

Tracking

()

People

(Reporter: shedokan1, Unassigned)

References

Details

Attachments

(2 files)

Attached file example.html
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0a1) Gecko/20111014 Firefox/10.0a1
Build ID: 20111014030948

Steps to reproduce:

1. Open up the example.html attachment
2 [review]. Click create once - this will create ten div's with and iframe in each(with google.com)
3. Click destroy - this will remove the iframes from the div's and the divs from the page


Actual results:

The compartment for google.com still exists after all iframes were deleted, and after pressing "minimize memory usage" multiple times.

This also happens with no add-ons enabled.


Expected results:

The compartment of the iframe should be removed when the iframe is removed.

here is the compartment:
│  ├───3,199,632 B (04.52%) -- compartment(http://www.google.com/)
│  │   ├──1,925,120 B (02.72%) -- gc-heap
│  │   │  ├────974,768 B (01.38%) -- arena-unused
│  │   │  ├────427,800 B (00.60%) -- objects
│  │   │  ├────257,856 B (00.36%) -- scripts
│  │   │  ├────245,640 B (00.35%) -- shapes
│  │   │  ├──────7,520 B (00.01%) -- arena-headers
│  │   │  ├──────5,440 B (00.01%) -- arena-padding
│  │   │  ├──────4,560 B (00.01%) -- strings
│  │   │  └──────1,536 B (00.00%) -- type-objects
│  │   ├────430,712 B (00.61%) -- script-data
│  │   ├────412,704 B (00.58%) -- property-tables
│  │   ├────327,680 B (00.46%) -- mjit-code
│  │   │    ├──324,300 B (00.46%) -- regexp
│  │   │    ├────3,300 B (00.00%) -- unused
│  │   │    └───────80 B (00.00%) -- method
│  │   ├─────55,544 B (00.08%) -- object-slots
│  │   ├─────31,072 B (00.04%) -- shape-kids
│  │   ├─────10,816 B (00.02%) -- type-inference
│  │   │     ├───9,280 B (00.01%) -- script-main
│  │   │     └───1,536 B (00.00%) -- object-main
│  │   ├──────4,016 B (00.01%) -- string-chars
│  │   └──────1,968 B (00.00%) -- object-empty-shapes
Whiteboard: [MemShrink]
Attachment #567208 - Attachment mime type: text/plain → text/html
Wow, that's pretty bad.  I can reproduce on trunk.
Likewise on: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111014 Firefox/10.0a1
Status: UNCONFIRMED → NEW
Component: General → DOM: Core & HTML
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → general
Version: 10 Branch → Trunk
Severity: normal → blocker
Justin, do you want this one?  If not, I'll take it.
Severity: blocker → major
Ah, the compartment does go away when the tab is closed.  So this isn't as bad as I thought.

Be my guest, Kyle.  :)
Seems like not all DOMWindows are deleted after clicking Destroy.
Severity: major → blocker
Summary: iFrame compartment does't go away after removing iframe → iframe compartment doesn't go away after removing iframe until tab is closed
(In reply to Justin Lebar [:jlebar] from comment #4)
> Ah, the compartment does go away when the tab is closed.  So this isn't as
> bad as I thought.
> 
> Be my guest, Kyle.  :)

This is still pretty bad though.

I'll look into this this week if nobody beats me to it.
Assignee: nobody → khuey
Status: NEW → ASSIGNED
This is InstallTrigger related, so it's nowhere near as bad as we first thought.
Severity: blocker → normal
Hi, 

I just wanted to thank Eric for creating the bug and also just to let you know that this memory consumption can be seen in IE as well.
I'm going to go ahead and call this a P2 since it's probably a dupe of a P2 bug.

Also, thanks for the bug report Eric.  Having a testcase made this pretty easy to debug.
Whiteboard: [MemShrink] → [MemShrink:P2]
The testcase doesn't work for me on trunk, I get a bunch of "Security Error: Content at http://www.google.com/ may not load data from https://bug694689.bugzilla.mozilla.org/attachment.cgi?id=567208" and the iframes are blank. Do I need to do something special to make it work?
Attached file Example - Version 2
It appears google is either blocking us or using it in iframes :)
Attachment #567759 - Attachment mime type: text/plain → text/html
The only actionable thing here is fixing InstallTrigger, which is happening in another bug.  Unassigning myself, and we can verify that the fix for InstallTrigger fixes this testcase when that lands.

Thanks again for the nice bug report.
Assignee: khuey → nobody
Status: ASSIGNED → NEW
You should thank johnny_dipin he told me about large memory usage when doing this in his app.
Thank you Eric and thank you everyone
Whiteboard: [MemShrink:P2]
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: