Closed Bug 1167589 Opened 6 years ago Closed 6 years ago
Mark the members of CSSParsing
Environment MOZ _UNSAFE _REF
Why make this change?
These are weak pointers for a very good reason, iirc: this is used in very performance sensitive code and the refcounting was showing up quite noticeably in profiles.
I've changed the patch to instead mark the members as MOZ_UNSAFE_REF, and reference the original bug which made the change (Bug 649163)
Attachment #8609363 - Attachment is obsolete: true
Attachment #8610122 - Flags: review?(dbaron)
Comment on attachment 8610122 [details] [diff] [review] Mark the members of CSSParsingEnvironment as MOZ_UNSAFE_REF Now that MOZ_NON_OWNING_REF and MOZ_UNSAFE_REF are basically the same thing underneath, I'm less confused. (Although the commit message of 229b03af6f2b was a little confusing in saying it was changing only documentation.) It's probably worth mentioning in the comment that the user of CSSParsingEnvironment is responsible for maintaining an owning reference for the lifetime of the CSSParsingEnvironment. The comment could probably otherwise be simplified, perhaps to: MOZ_UNSAFE_REF("user of CSSParsingEnviroment must hold an owning " "reference; reference counting here has unacceptable " "performance overhead (see bug 649163)") Also, please don't include the URL for the bug in the commit message; just include the bug number. r=dbaron with that or similar But please change the summary of the bug as well to match what you're doing!
Attachment #8610122 - Flags: review?(dbaron) → review+
Assignee: nobody → michael
Summary: Made the members of CSSParsingEnvironment nsCOMPtrs → Mark the members of CSSParsingEnvironment MOZ_UNSAFE_REF
You need to log in before you can comment on or make changes to this bug.