r=caillon a=dsicore
If we reach ~jsdService, that means our client doesn't care about us, so we can
(and should) drop all references to any callbacks (if they cared, they'd have
kept us alive!*).
I think jsdService::Off should clear all the hooks, the strange magic of not
clearing it isn't really a great idea. So for Off, we'll now clear the
ScriptHook too (consumers who use off should really drop any references they
have to our objects...). I'm still on the fence on this point, I suspect we can
actually move it from ::Off to ~jsdService (it must be cleared at some point,
otherwise if jsd_xpc's library manages to get unloaded, the function pointer
would be invalid, which would be *BAD*).
jsds_NotifyPendingDeadScripts needs to clear gDeadScripts whether or not
there's a service or hooks, so it does. Because it's a static callback and
because of the scary way GC works, I'd rather ensure (deathgrip) that jsds is
available (and consistent!) for the duration of the function call. The code
already handles the lack of a hook, so there's no reason to do magical
returns....
The real problem which mayhemer found was that jsdService::Off was returning
early (failure) because gGCStatus wasn't JSGC_END when called from ~jsdService
from JS_GC from the cyclecollector, so we make sure that ~jsdService forces
::Off to act as if it is JSGC_END (after ensuring that there are no callbacks
available).
* a pure javascript (xpcom component, not DOM hosted!) version of a jsdService
consumer means that jsdService will need to talk to the CycleCollector
eventually (this is another bug for the future).
r=caillon, sr=brendan, a=asa
adds the ability to turn off the object tracking without having to disable the debugger. should make a dormant venkman less of a performance impact.
prevent any stack with a disabled frame from being debugged during single-stepping, or break-on-throw. Also adds versioning support to the jsdIDebuggerService interface.
"add ability to get at function object for a jsdIScript"
add a |functionObject| attribute to the jsdIScript interface, which returns the function's JSObject as a jsdIValue
Stop caching jsdIValues, it doesn't seem to be worth the lookup cost. This has the side effect of plugging the leak, as described in the bug.
also...
* Convert a few raw pointers to nsCOMPtrs
* Fix a bug where removing the last filter did not null out the list head,
causing a crash the next time filters were used.
* Track live jsdStackFrames, so we can invalidate them all when execution
continues. Without this, only the top frame is properly invalidated, and any
other frame accessed after a continue will do Bad Things.
* Add some debugging prints to GetInitAtService, which seems to be failing at
random times.
bug 139883, "ErrorHookProc can be tricked into thinking it never finished running", r=peterv
fixes bad early return in jsds_ErrorHookProc
test for correct max params (12, not 8) in CreatePPLineMap
use nsnull instead of 0 for null pointer return value