Closed Bug 1168154 Opened 9 years ago Closed 9 years ago

Mark refcounted members of nsCSSValue::mValue as MOZ_OWNING_REF

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: nika, Assigned: nika)

Details

Attachments

(1 file)

Attachment #8610181 - Flags: review?(cam)
Comment on attachment 8610181 [details] [diff] [review]
Mark refcounted members of nsCSSValue::mValue as MOZ_OWNING_REF

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

Does it make sense to put MOZ_NON_OWNING_REF on m{,Pair}ListDependent, since they're owned by other objects outside nsCSSValue?
Attachment #8610181 - Flags: review?(cam) → review+
I don't think that it makes sense to do that, as, unless I'm wrong, m{,Pair}ListDependent aren't reference counted values, and MOZ_NON_OWNING_REF is meant to talk about a pattern of dealing with weak references to reference counted values, rather than just references to things which we don't have direct ownership over.
Assignee: nobody → michael
(In reply to Michael Layzell [:mystor] from comment #3)
> I don't think that it makes sense to do that, as, unless I'm wrong,
> m{,Pair}ListDependent aren't reference counted values, and
> MOZ_NON_OWNING_REF is meant to talk about a pattern of dealing with weak
> references to reference counted values, rather than just references to
> things which we don't have direct ownership over.

OK.  (The comments in mfbt/Attributes.h about these attributes don't mention anything about them being for pointers to refcounted things.)
https://hg.mozilla.org/mozilla-central/rev/e62819d6561e
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: