Closed Bug 611639 Opened 9 years ago Closed 9 years ago

NS_ProxyRelease does not work for RefPtrs

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla2.0b9
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: mak, Assigned: mak)

References

Details

(Whiteboard: [fixed-in-places])

Attachments

(1 file)

We are missing an overload for RefPtrs, that means that trying to use it with RefPtrs does not release on the requested thread, but on the current one.

My patch in bug 599973 hit this when trying to release an instance of nsFaviconService on the main-thread.
oh and actually that means we crash on dereference when the release happens in the async runnable since it has already been release.
Attached patch patch v1.0Splinter Review
I'm not sure if NS_HIDDEN_ is really still needed nowadays, but I mostly did a 1:1 copy of the COMPtr overload
Attachment #490077 - Flags: review?
Attachment #490077 - Flags: review? → review?(benjamin)
Need this to fix a blocker (I suppose we could work around this be implementing it ourselves, but that's just silly).
blocking2.0: --- → betaN+
Comment on attachment 490077 [details] [diff] [review]
patch v1.0

I just talked with shaver.  He says r=shaver but we need to template it if we get a third one.
Attachment #490077 - Flags: review?(benjamin)
http://hg.mozilla.org/mozilla-central/rev/d65c65ef13a4
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b9
You need to log in before you can comment on or make changes to this bug.