Closed
Bug 1282343
Opened 8 years ago
Closed 8 years ago
Clean up CompositorSession shutdown
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: dvander, Assigned: dvander)
References
Details
Attachments
(2 files, 1 obsolete file)
819 bytes,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
6.17 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
We don't ever explicitly release the last reference to CompositorBridgeParent - either nsBaseWidget will do it via its destructor, or CompositorBridgeParent::DeferredDestroy will do it if ~nsBaseWidget runs first. I'd like to make this more explicit so it's totally clear that the compositor is no longer in use.
Assignee | ||
Comment 1•8 years ago
|
||
This spells out the behavior of how CompositorBridgeParent is destroyed, from the point of view of the CompositorSession. It also makes sure to null out any CompositorSession-related pointers in nsBaseWidget::DestroyCompositor().
Attachment #8765314 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8765314 [details] [diff] [review] part 1, revoke all compositor pointers kats, to make sure nulling out mAPZC is okay here.
Attachment #8765314 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 3•8 years ago
|
||
Technically the compositor can still access the widget even though it may be gone. I don't think this actually happens, but we might as well null this out to be sure.
Attachment #8765315 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 4•8 years ago
|
||
try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d0cc51d99571a5cec016f5bffb1709228a736395
Updated•8 years ago
|
Attachment #8765314 -
Flags: review?(matt.woodrow) → review+
Updated•8 years ago
|
Attachment #8765315 -
Flags: review?(matt.woodrow) → review+
Comment 5•8 years ago
|
||
Comment on attachment 8765314 [details] [diff] [review] part 1, revoke all compositor pointers Review of attachment 8765314 [details] [diff] [review]: ----------------------------------------------------------------- I'm not sure, to be honest. I read through my notes from the last time I had to go through the widget/compositor shutdown code [1] but I'm not sure when CompositorSession::Shutdown fits in that process. However, if it makes sense to do so, I would like to have mAPZC nulled out in the same place that we destroy the mRootContentController - so either do the nulling out in nsBaseWidget::OnDestroy, or move the existing mRootContentController code to nsBaseWidget::DestroyCompositor. I suspect the former is safer. Also please check that opening and closing windows without shutting down the whole browser doesn't leak stuff (i.e. bug 1264161 doesn't regress) because we don't have any automated coverage for that scenario. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1264161#c25
Assignee | ||
Comment 6•8 years ago
|
||
kats, this patch factors the content controller step into a separate method, and calls it in both places to be safe. I also cleaned up the fail case of CreateCompositor() and added something of a comment explaining the shutdown sequence. I'll test on OS X tonight to make sure that memory leak hasn't regressed.
Attachment #8765314 -
Attachment is obsolete: true
Attachment #8765314 -
Flags: review?(bugmail.mozilla)
Attachment #8765666 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 7•8 years ago
|
||
try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e7f191fbe56489cf40d8e57d31495a5ea8acf21f
Comment 8•8 years ago
|
||
Comment on attachment 8765666 [details] [diff] [review] part 1, revoke all compositor pointers v2 Review of attachment 8765666 [details] [diff] [review]: ----------------------------------------------------------------- Thanks, the comment is very useful!
Attachment #8765666 -
Flags: review?(bugmail.mozilla) → review+
Pushed by danderson@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0ac0b0b0968d Don't leave temporary dangling nsWindow references to CompositorBridgeParent. (bug 1282343 part 1, r=mattwoodrow,kats) https://hg.mozilla.org/integration/mozilla-inbound/rev/8896a11ad540 Revoke widget pointer from CompositorBridgeParent on shutdown. (bug 1282343 part 2, r=mattwoodrow)
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0ac0b0b0968d https://hg.mozilla.org/mozilla-central/rev/8896a11ad540
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•