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

NEW
Unassigned

Status

()

Core
DOM: Core & HTML
7 years ago
5 years ago

People

(Reporter: Eric Sh., Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
Created attachment 567208 [details]
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
(Reporter)

Updated

7 years ago
Whiteboard: [MemShrink]
(Reporter)

Updated

7 years ago
Blocks: 668871

Updated

7 years ago
Attachment #567208 - Attachment mime type: text/plain → text/html
Wow, that's pretty bad.  I can reproduce on trunk.

Comment 2

7 years ago
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
(Reporter)

Updated

7 years ago
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.  :)

Comment 5

7 years ago
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

Comment 8

7 years ago
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?
(Reporter)

Comment 11

7 years ago
Created attachment 567759 [details]
Example - Version 2
(Reporter)

Comment 12

7 years ago
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
(Reporter)

Comment 14

7 years ago
You should thank johnny_dipin he told me about large memory usage when doing this in his app.

Comment 15

7 years ago
Thank you Eric and thank you everyone
Whiteboard: [MemShrink:P2]
You need to log in before you can comment on or make changes to this bug.