Re: Implement jsdICompilationUnit

Gijs Kruitbosch <[email protected]> Wed, 02 Dec 2009 10:42:26 +0100
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
On 02/12/2009 00:29 AM, John J Barton wrote:
> For Firefox 3.7 I want to push to get an extension to jsd that would
> dramatically improve Firebug and improve Firefox's support for dynamic
> Javascript. I am looking for more feedback on the approach I am taking:
>
> Bug 449464 - Implement jsdICompilationUnit to extend jsd to include
> information on the compilation unit structure.
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=449464
>
> The bug has more justification and details. Broadly the API attempts to
> mimic the current jsdIDebuggerService style by adding a new callback
> hook, jsdICompilationHook and a new enumerate call,
> enumerateCompiledScripts(). This makes the API narrow but idiosyncratic
> (a good match to the current API ;-).
>
> The implementation is "lightly salted": a few lines need to be added in
> a lot of places. Every place JS can be compiled needs a call to the hook
> and the hook-setting code needs to propagate up through the jsd layer
> cake to the JS interface. Algorithmically the jsengine builds a simple
> list of jsdIScripts threaded through JSDScript with the head in
> JSDContext. If the compilation hook is taken, the list can be copied out
> via enumerateCompiledScripts(), else it is not useful.
>
> I would appreciate input. (I tried to set the followup here to
> mozilla.dev.apps.js-debugger, but I know that group is not widely
> followed so I've added platform and js-engine).
>
> jjb

You didn't link this newsgroup post from the actual bug, so I hadn't seen it 
before replying extensively there. I think it's very confusing that you keep 
talking about "jsdICompilationUnit", which doesn't actually exist (neither in 
your patch nor currently) -- at least, that confused my initial feedback. But 
anyway, feedback is on the bug, no sense repeating it all here.

~ Gijs