- 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.
Approved by: av@netscape.com
Reviewed by: av@netscape.com
/**
* This method queries the prefs for proxy information.
* It has been tested and is known to work in the following three cases
* when no proxy host or port is specified
* when only the proxy host is specified
* when only the proxy port is specified
* This method conforms to the return code specified in
* http://developer.netscape.com/docs/manuals/proxy/adminnt/autoconf.htm#1020923
* with the exception that multiple values are not implemented.
*/
NS_IMETHODIMP nsPluginHostImpl::FindProxyForURL(const char* url, char* *result)