Assert that nsXPConnect::ReleaseXPConnectSingleton removes last reference to nsXPConnect

RESOLVED FIXED in mozilla15

Status

()

Core
XPConnect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: espindola, Assigned: espindola)

Tracking

unspecified
mozilla15
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 616100 [details] [diff] [review]
fix it and add assert

The debug code in nsXPConnect::ReleaseXPConnectSingleton expects it is the one to remove the last reference to nsXPConnect. Unfortunately, this is not the case right now, but it is easy to fix.

This patch fixes it and adds an assert to make the assumption explicit.
https://tbpl.mozilla.org/?tree=Try&rev=e4087eb0fe8d
Assignee: nobody → respindola
Status: NEW → ASSIGNED
Attachment #616100 - Flags: review?(benjamin)
Attachment #616100 - Flags: review?(benjamin) → review+
The assert found an existing leak in xpcshell-tests. I pushed with out the assert to

https://tbpl.mozilla.org/?tree=Birch&rev=0808c7e0388e

We can enable the assert once billm fixes the leak
https://hg.mozilla.org/mozilla-central/rev/0808c7e0388e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.