Closed Bug 1167395 Opened 9 years ago Closed 9 years ago

Mark CharacterDataChangeInfo::Details as MOZ_STACK_CLASS, and mark mNextSibling as MOZ_NON_OWNING_REF

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: nika, Assigned: nika)

Details

Attachments

(1 file, 1 obsolete file)

Attachment #8609014 - Flags: review?(jst)
Comment on attachment 8609014 [details] [diff] [review]
Change CharacterDataChangeInfo::mNextSibling to a smart pointer

I took a look at this bug as I bounced it over to you.

I think that there is a very good chance that it isn't correct, I can't remember if I actually traced through every user to make sure that there are no cycles, but the relationships through DXR don't look super easy to trace through.

Tests did pass with the change though, so maybe it's OK? If you know how this is used, I can probably use that information to get a better idea of whether or not the change will introduce a memory leak.
Attachment #8609014 - Flags: review?(jst) → feedback?(ehsan)
Comment on attachment 8609014 [details] [diff] [review]
Change CharacterDataChangeInfo::mNextSibling to a smart pointer

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

I think Olli is a better reviewer for this.
Attachment #8609014 - Flags: feedback?(ehsan) → feedback?(bugs)
CharacterDataChangeInfo::Details is a stack only struct (although it isn't marked as such), so I don't see any reason to
slow down the current behavior.
I would mark the variable MOZ_NON_OWNING_REF.
Also, I checked the current usage, and it is definitely safe.
Assignee: nobody → michael
Summary: Change CharacterDataChangeInfo::mNextSibling to a smart pointer → Mark CharacterDataChangeInfo::Details as MOZ_STACK_CLASS, and mark mNextSibling as MOZ_NON_OWNING_REF
Comment on attachment 8629530 [details] [diff] [review]
Mark CharacterDataChangeInfo::Details as MOZ_STACK_CLASS, and mark mNextSibling as MOZ_NON_OWNING_REF

Thanks
Attachment #8629530 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/78d7bfaf3fc1
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: