Consider dropping refcounting in AsyncPanZoomController and maybe other layers/ipc classes

RESOLVED INVALID

Status

RESOLVED INVALID
6 years ago
6 years ago

People

(Reporter: bjacob, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 obsolete attachment)

The lifetime of AsyncPanZoomController doesn't seem to be controlled by refcounting (all the more since https://hg.mozilla.org/integration/mozilla-inbound/rev/b7c845b323d0) yet AsyncPanZoomController is refcounted.

Having unused refcounting seems dangerous, because if now someone arrived here, saw APZC being refcounted, and made code holding a nsRefPtr<APZC>, then the APZC would get destroyed as soon as that nsRefPtr<APZC> would go away (because nothing else addref'd it), which would be surprising, right?

Comment 1

6 years ago
Created attachment 706417 [details] [diff] [review]
Patch (v1)
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #706417 - Flags: review?(roc)

Comment 2

6 years ago
Comment on attachment 706417 [details] [diff] [review]
Patch (v1)

Nevermind... <http://mxr.mozilla.org/mozilla-central/source/gfx/layers/ipc/CompositorParent.cpp#1247> and friends seem to rely on this being refcounted.
Attachment #706417 - Attachment is obsolete: true
Attachment #706417 - Flags: review?(roc)

Updated

6 years ago
Assignee: ehsan → nobody
(Reporter)

Comment 3

6 years ago
Sorry about that. Shall we RESOLVE INVALID?

Comment 4

6 years ago
(In reply to comment #3)
> Sorry about that. Shall we RESOLVE INVALID?

Well, if we're sure that the lifetime of this object is not managed manually anywhere, sure.
(Reporter)

Comment 5

6 years ago
It looks complicated. If I understand correctly, the lifetime is managed by refcount, but the refcount is tweaked manually. So I think that this bug is INVALID.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.