Closed Bug 1122991 Opened 9 years ago Closed 9 years ago

Mark findIndexOfClosure as stack class, and make its targetElement member a strong ref; r=froydnj

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

      No description provided.
Assignee: nobody → ehsan
Comment on attachment 8550797 [details] [diff] [review]
Mark findIndexOfClosure as stack class, and make its targetElement member a strong ref

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

r=me, but I think the strong-refness is just unnecessary work in this case.

::: xpcom/ds/nsArray.cpp
@@ +14,2 @@
>  {
> +  nsCOMPtr<nsISupports> targetElement;

Can't IndexOf() just assume that somebody else is holding references to the element?
Attachment #8550797 - Flags: review?(nfroyd) → review+
I can do something better in fact!  Since this is just used for pointer comparison, I'll convert it to a void*!
https://hg.mozilla.org/mozilla-central/rev/df5fad5e386d
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: