Re: FF 3.5 and JS_GC Crashes

Blake Kaplan <[email protected]> Thu, 23 Jul 2009 15:20:17 -0500
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
In mozilla.dev.platform Glenn Boysko <[email protected]> wrote:
> The extension uses nsIWebProgressListener and jsdIDebuggerService APIs
> extensively. It also features a C++ XPCOM (to monitor browser process
> CPU usage) and an JavaScript XPCOM component.

Hi Glenn,

Are you dealing with JavaScript values in your C++? If so, then you might be
running into what we call garbage collection hazards: the JS garbage collector
doesn't know about references to JS objects from the C++ stack or heap, so
unless you explicitly tell it about your references, it will collect objects
that you're holding (see
<https://developer.mozilla.org/en/SpiderMonkey_Garbage_Collection_Tips> for
more information about this).

It's also possible that you're running into bugs in either the engine (which
is susceptable to the same sorts of problem) or in the implementation of
jsdIDebuggerService... It's hard to tell exactly what's going on from here,
though.

There are a few debugging tricks you can use to track down these sorts of
problems, but they require a debug build.
-- 
Blake Kaplan