Closed Bug 1168154 Opened 5 years ago Closed 5 years ago

Mark refcounted members of nsCSSValue::mValue as MOZ_OWNING_REF

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: Nika, Assigned: Nika)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attachment #8610181 - Flags: review?(cam)
Blocks: 1114683
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
Keywords: checkin-needed
(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: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.