Closed Bug 1288440 Opened 9 years ago Closed 9 years ago

ActionButton leaks existing windows through sdk/tab/events and sdk/window/events

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox47 wontfix, firefox48 wontfix, firefox49 fixed, firefox-esr45 wontfix, firefox50 fixed)

RESOLVED FIXED
mozilla50
Tracking Status
firefox47 --- wontfix
firefox48 --- wontfix
firefox49 --- fixed
firefox-esr45 --- wontfix
firefox50 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

(Whiteboard: [MemShrink])

Attachments

(4 files, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1267693 +++ The mozilla-tree-status addon still causes leaks. This time its coming through the sdk/tab/events module: 000001B6C7C54380 [Sandbox 1b6c8050178] --[group]--> 000001B6C7CE70A0 [object_group] --[group_proto]--> 000001B6C832B320 [Proxy <no private>] --[private]--> 000001B6C756D780 [Object <no private>] --[require]--> 000001B6C7CE86C0 [Function require] --[fun_environment]--> 000001B6C00F4E20 [Call <no private>] --[loader]--> 000001B6BD08A480 [Object <no private>] --[sandboxes]--> 000001B6BD0A9A60 [Object <no private>] --[resource://gre/modules/commonjs/sdk/tab/events.js]--> 000001B6C18F5720 [Proxy <no private>] --[private]--> 000001B6C18F56A0 [Proxy <no private>] --[private]--> 000001B6C7C54420 [Sandbox 1b6c708f7d8] --[interactiveWindows]--> 000001B6C7F665E0 [Proxy <no private>] --[private]--> 000001B6C7F6B580 [Array <no private>] --[objectElements[1]]--> 000001B6C18F53C0 [Proxy <no private>] --[private]--> 000001B6C2B26040 [Proxy <no private>] --[private]--> 000001B6C2B15060 [Window <no private>] This is getting pulled in from sdk/ui/state/events which is in turn pulled in through the ActionButton.
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
This leaks windows open when the addon is loaded.
This test provokes the leak.
Actually, there is a leak of existing windows in sdk/window/events as well. <sigh>
Summary: ActionButton leaks windows through sdk/tab/events → ActionButton leaks existing windows through sdk/tab/events and sdk/window/events
Updated with actual test contents.
Attachment #8773330 - Attachment is obsolete: true
Test that demonstrates the window/events leaks.
It might be a better use of your time helping erahm out with test failures in bug 1276366. ;) That should fix all of these leaks.
(In reply to Andrew McCreight [:mccr8] from comment #6) > It might be a better use of your time helping erahm out with test failures > in bug 1276366. ;) > > That should fix all of these leaks. I agree bug 1276366 is the best long term solution. I'm just trying to plug some holes in the meantime. Also, I want fixes that can be uplifted if possible.
Comment on attachment 8773440 [details] [diff] [review] P1 Avoid leaking existing windows in sdk/tab/events. r=gabor This patch fixes a leak due to some of the intermediate channels being left as variables on the sandbox global. Wrapping in a function seemed the best way to avoid the same mistake being repeated in the future.
Attachment #8773440 - Flags: review?(gkrizsanits)
Comment on attachment 8773441 [details] [diff] [review] P2 Don't leak existing windows in sdk/window/events. r=gabor This patch is similar to P1, but for sdk/window/events instead. Again, some of the intermediates are leaking windows. Wrapping in a function fixes the leak.
Attachment #8773441 - Flags: review?(gkrizsanits)
Comment on attachment 8773428 [details] [diff] [review] P3 Test that sdk/tab/events does not leak. r=gabor This test passes with the P1 patch, but fails without the P1 patch.
Attachment #8773428 - Flags: review?(gkrizsanits)
Comment on attachment 8773429 [details] [diff] [review] P4 Test that sdk/window/events does not leak existing windows. r=gabor This test passes with the P2 patch, but fails without the P2 patch.
Attachment #8773429 - Flags: review?(gkrizsanits)
Comment on attachment 8773440 [details] [diff] [review] P1 Avoid leaking existing windows in sdk/tab/events. r=gabor Review of attachment 8773440 [details] [diff] [review]: ----------------------------------------------------------------- This all looks great, thanks for finding/fixing these leaks!
Attachment #8773440 - Flags: review?(gkrizsanits) → review+
Attachment #8773441 - Flags: review?(gkrizsanits) → review+
Attachment #8773428 - Flags: review?(gkrizsanits) → review+
Attachment #8773429 - Flags: review?(gkrizsanits) → review+
Pushed by bkelly@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/44d3308a260e P1 Avoid leaking existing windows in sdk/tab/events. r=gabor https://hg.mozilla.org/integration/mozilla-inbound/rev/fb9e0b43f99b P2 Don't leak existing windows in sdk/window/events. r=gabor https://hg.mozilla.org/integration/mozilla-inbound/rev/e97c19b04dba P3 Test that sdk/tab/events does not leak. r=gabor https://hg.mozilla.org/integration/mozilla-inbound/rev/2b1ddc2f0919 P4 Test that sdk/window/events does not leak existing windows. r=gabor
Comment on attachment 8773440 [details] [diff] [review] P1 Avoid leaking existing windows in sdk/tab/events. r=gabor Approval Request Comment [Feature/regressing bug #]: Memory leak in addons and parts of firefox browser chrome using addon-sdk. [User impact if declined]: Degraded performance. [Describe test coverage new/current, TreeHerder]: Added jetpack tests in P3 and P4. [Risks and why]: Minimal. No functional change. [String/UUID change made/needed]: None.
Attachment #8773440 - Flags: approval-mozilla-aurora?
Comment on attachment 8773441 [details] [diff] [review] P2 Don't leak existing windows in sdk/window/events. r=gabor See comment 16.
Attachment #8773441 - Flags: approval-mozilla-aurora?
Comment on attachment 8773429 [details] [diff] [review] P4 Test that sdk/window/events does not leak existing windows. r=gabor See comment 16.
Attachment #8773429 - Flags: approval-mozilla-aurora?
Comment on attachment 8773428 [details] [diff] [review] P3 Test that sdk/tab/events does not leak. r=gabor See comment 16.
Attachment #8773428 - Flags: approval-mozilla-aurora?
Comment on attachment 8773440 [details] [diff] [review] P1 Avoid leaking existing windows in sdk/tab/events. r=gabor Fix a leak, taking it in aurora.
Attachment #8773440 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8773441 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8773429 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8773428 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: