Last Comment Bug 746541 - Assert that nsXPConnect::ReleaseXPConnectSingleton removes last reference to nsXPConnect
: Assert that nsXPConnect::ReleaseXPConnectSingleton removes last reference to ...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla15
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-18 06:16 PDT by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2012-04-24 18:06 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix it and add assert (1.65 KB, patch)
2012-04-18 06:23 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
benjamin: review+
Details | Diff | Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-04-18 06:16:51 PDT

    
Comment 1 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-04-18 06:23:13 PDT
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
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-04-20 13:51:51 PDT
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
Comment 3 :Ehsan Akhgari (busy, don't ask for review please) 2012-04-24 18:06:04 PDT
https://hg.mozilla.org/mozilla-central/rev/0808c7e0388e

Note You need to log in before you can comment on or make changes to this bug.