Closed Bug 1305829 Opened 8 years ago Closed 8 years ago

Delay the DidComposite call in ClientLayerManager's destructor

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox51 --- fixed
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: dvander, Assigned: dvander)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Split off from bug 1305628. We can immediately begin painting again inside ClientLayerManager's destructor, creating a new compositor and everything. This is a source of potential subtle problems and bug 1305628 isn't the first one that's actually come up.

Matt explained that this is to avoid the nsRefreshDriver getting stuck, so this patch just posts the NotifyTransactionCompleted call to the event loop. It looks like we can probably skip the other DidComposite logic.
Attached patch fix (obsolete) (deleted) — Splinter Review
Attachment #8795447 - Flags: review?(matt.woodrow)
Comment on attachment 8795447 [details] [diff] [review]
fix

Review of attachment 8795447 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/client/ClientLayerManager.cpp
@@ +119,1 @@
>      TimeStamp now = TimeStamp::Now();

We can get rid of 'now', right?
Attachment #8795447 - Flags: review?(matt.woodrow) → review+
Pushed by danderson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/33c254db1f15
Delay the DidComposite call in ClientLayerManager's destructor. (bug 1305829, r=mattwoodrow)
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b2091e309c88
Backed out changeset 33c254db1f15 for causing memory leaks on OS X
Attached patch v2 (deleted) — Splinter Review
This version has two additional changes. First, the revoke-transaction task is posted in ClientLayerManager::Destroy, rather than the destructor. Second, nsBaseWidget revokes the nsTransactionIdAllocator from the layer manager if the widget is about to shut down.

This should prevent us from reviving the layer manager recursively, and from reviving it during shutdown.
Attachment #8795447 - Attachment is obsolete: true
Flags: needinfo?(dvander)
Attachment #8812992 - Flags: review?(matt.woodrow)
Attachment #8812992 - Flags: review?(matt.woodrow) → review+
Pushed by danderson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7e4570efaff8
Delay the DidComposite call in ClientLayerManager's destructor. (bug 1305829, r=mattwoodrow)
https://hg.mozilla.org/mozilla-central/rev/7e4570efaff8
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment on attachment 8812992 [details] [diff] [review]
v2

Approval Request Comment
[Feature/Bug causing the regression]: None
[User impact if declined]: Required to uplift bug 1319213
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: Has survived on Nightly. This simply fires a notification earlier than it used to, to avoid a memory leak on shutdown.
[String changes made/needed]: None
Attachment #8812992 - Flags: approval-mozilla-beta?
Attachment #8812992 - Flags: approval-mozilla-aurora?
Comment on attachment 8812992 [details] [diff] [review]
v2

Fix for memory leak, let's take this on aurora and beta.
It should end up in beta 12, going to build this Thursday.
Attachment #8812992 - Flags: approval-mozilla-beta?
Attachment #8812992 - Flags: approval-mozilla-beta+
Attachment #8812992 - Flags: approval-mozilla-aurora?
Attachment #8812992 - Flags: approval-mozilla-aurora+
No crashes on 51.0b12 or 52.0a2 since this landed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: