Closed
Bug 961793
Opened 11 years ago
Closed 11 years ago
BrowserElementChildPreload/BrowserElementPanning need to unregister observers
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
People
(Reporter: froydnj, Assigned: froydnj)
References
(Blocks 1 open bug)
Details
(Keywords: memory-leak, perf, Whiteboard: [caf priority: p3][c=memory p= s=2014.01.31 u=1.3][qa-][cr 606932])
Attachments
(2 files)
(deleted),
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
The observers added here:
http://mxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementChildPreload.js#256
http://mxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementPanning.js#61
never get removed and build up over the course of mochitest runs.
Please note that the correct solution here is not to make the BrowserElementPanning observers weak observers; we should instead make the BrowserElementChildPreload observers strong observers and then properly manage the lifetime of all the observers.
Assignee | ||
Comment 1•11 years ago
|
||
Turns out we can just remove the observers at unload.
I'm less sure of how to address BrowserElementPanning's observers, as
BrowserElementChildPreload can't (I don't think) see the ContentPanning
variable defined therein. Registering an unload handler for ContentPanning
would work, I suppose. Do you have any preferred course of action here?
Attachment #8362677 -
Flags: review?(fabrice)
Comment 2•11 years ago
|
||
Comment on attachment 8362677 [details] [diff] [review]
don't register weak observers in BrowserElementChildPreload.js
Review of attachment 8362677 [details] [diff] [review]:
-----------------------------------------------------------------
I'm fine with trying to use an unload handler for BEPanning too.
::: dom/browser-element/BrowserElementChildPreload.js
@@ +100,5 @@
>
> return null;
> }
>
> +const OBSERVED_EVENTS = [
I would prefer kObservedEvents, but no big deal if you want to stick with UPPER_CASE
Attachment #8362677 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #2)
> I'm fine with trying to use an unload handler for BEPanning too.
OK, great, I'll just add that in a separate patch.
> ::: dom/browser-element/BrowserElementChildPreload.js
> > +const OBSERVED_EVENTS = [
>
> I would prefer kObservedEvents, but no big deal if you want to stick with
> UPPER_CASE
I went with UPPER_CASE because that seemed to be the prevailing style in that file.
Assignee | ||
Comment 4•11 years ago
|
||
Flags: in-testsuite-
Whiteboard: [leave open]
Assignee | ||
Comment 6•11 years ago
|
||
...and here's the equivalent patch for BrowserElementPanning.js.
Attachment #8363968 -
Flags: review?(fabrice)
Updated•11 years ago
|
Attachment #8363968 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Whiteboard: [leave open]
Comment 8•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Comment 10•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/662ce8f620a9
https://hg.mozilla.org/releases/mozilla-aurora/rev/299ddf0c23a8
status-b2g-v1.3:
--- → fixed
status-b2g-v1.4:
--- → fixed
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
status-firefox29:
--- → fixed
Updated•11 years ago
|
Updated•11 years ago
|
Whiteboard: [c=memory p= s= u=1.3] → [c=memory p= s=2014.01.31 u=1.3]
Updated•11 years ago
|
Whiteboard: [c=memory p= s=2014.01.31 u=1.3] → [c=memory p= s=2014.01.31 u=1.3][qa-]
Updated•11 years ago
|
Whiteboard: [c=memory p= s=2014.01.31 u=1.3][qa-] → [c=memory p= s=2014.01.31 u=1.3][qa-][cr 606932]
Updated•10 years ago
|
Whiteboard: [c=memory p= s=2014.01.31 u=1.3][qa-][cr 606932] → [caf priority: p3][c=memory p= s=2014.01.31 u=1.3][qa-][cr 606932]
Updated•10 years ago
|
Assignee: nobody → nfroyd
status-b2g-v1.3T:
--- → fixed
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•