mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-15 13:09:14 +00:00
![jband%netscape.com](/assets/img/avatar_default.png)
- map xpcshell's 'quit()' to a loop exit rather than calling 'exit(0)' so that the cleanup and leak detection code will still get called. - add NS_InitXPCOM and NS_ShutdownXPCOM to xpcshell to run said cleanup and leak detection code. - use more NS_IF_* macros - fix numerous places where code assumed that nsXPConnect::GetXPConnect() does not add a new ref on the xpconnect singleton object (the behavior changed some time back but not all the uses did - brainfade!). - fix nsXPCException::NewException to automatically trim 'dataless' native stackframes off of the front of a stack trace. The old system of manually telling it how many frames to trim was not working well. We really want the first frame showing to be an 'interesting' frame so that callers who get exceptions thrown at them will see some useful information rather than an empty native frame that represents (but says nothing about) some native frame in the xpconnect runtime. - remove an extra addref from the trimming loop in nsXPCException::NewException. - Stop building XPCJSStack objects. XPConnect stacks are singly linked lists of XPCJSStackFrame objects with refcounted links. I had this stupid idea that each object would have a refcounted link to a XPCJSStack object that would tie together the lifetimes of all objects in the chain. This was overcomplex and unnecessary. The linked list was enough. Any frame without a refcount deserved to be deleted because it is simply unreachable. There was no reason to tie together all the lifetimes of each object in the chain. So this has been simplified in a big way. - fixed place in xpcthrower.cpp where we were leaking a refcount on the xpconnect singleton each time an xpcexception was thrown. - do cleanup and gc() at the end of xpctest_echo.js to use for leak testing - all wrappers should go away.