I am working on a FireFox add-on that is a combination of javascript,
XUL, XPCOM (C++), etc. It works fine in FireFox 1.5/2.0 and now
working with FireFox 3 Betas. The add-on was working fine up until
Beta 2. The problem is that I am now getting some strange errors that
occur down in the Javascript garbage collection. I was able to track
down the problem to the following calls that are made in our C++ Add-
In DLL.
nsCOMPtr<nsIURI> spURI = nsnull;
nsCOMPtr<nsIChannel> spChannel = nsnull;
nsresult rv = NS_NewURI(getter_AddRefs(spURI),
sUrl.c_str()
); // pass in nsIIOService to optimize
callers
if (NS_FAILED(rv) || (nsnull == spURI))
return;
rv = NS_NewChannel(getter_AddRefs(spChannel),
spURI
);
if (NS_FAILED(rv) || (nsnull == spChannel))
return;
The crash does not occur right away, the above code works fine and the
channel works properly, but the crash occurs a short time later when
Firefox does a background garbage collection. Obviously this code is
through out all of FireFox and by itself does not cause a problem, but
it seems that I can easily repeat this problem if I do the above calls
while inside one of our background threads. So, seems that something
has changed in Beta 2 with the above calls if they occur in something
beside the main thread.
Following is the crash report.
Crash ID: bp-25e3f019-b94f-11dc-8504-001a4bd46e84
http://crash-stats.mozilla.com/report/index/25e3f019-b94f-11dc-8504-001a4bd46e84?date=2008-01-02-16
Thanks,
Ron
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network