On Tue, Aug 4, 2009 at 16:49, johnjbarton<[email protected]> wrote:
> On Aug 4, 3:24 am, Olivier Cornu <[email protected]> wrote:
>> On Sat, Aug 1, 2009 at 18:34, johnjbarton<[email protected]> wrote:
> ...
>> > SourceFiles are then used to map jsdIScripts to source that is shown
>> > to the user.  (SourceFiles are defined in lib.js)
>>
>> Alright. I'm still unsure as to how i am going to deal with the fact
>> that a single GM script may be composed of several JS source files
>> (glued and run in the same sandbox), which i'd like to show separately
>> in Firebug's script tab. But this can be dealt with later...
>
> Oh, I did not know this part.

It's somewhat reassuring to realize there's been some misunderstanding
around this at some point... :-p


>> Yes. And the file name seems to be needed as well, at least for the
>> GUI: so far it shows webmonkey.js, which is the JS code creating the
>> sandbox, not the script code running inside it.
>
> Yes, that is all the compiler knows, because that is what GM told it.

I take it this is happening behind the scene: i'm not aware of any GM
code specifically providing this kind of information to the compiler.


>> I guess this GM method should return the needed script's details,
>> whatever they end up being. As far as i can see, the only reference to
>> the running script we share between GM and FB is the Sandbox object
>> it's running in -- that should be the method parameter.
>
>  You will need the line numbers for points of concatenation, eg. a.js
> 1-150, b.js 151-213, c.js 213-end.

Yes. From what i see, i guess line numbers should be taken care of in
SandboxSourceFile...

> You might return a sourcefile representing the webmonkey.js with a
> single script, the outer script representing the body of the function
> that run the sandbox global method (called outerScript in Firebug).
>
> (...) just jam the other ones on the context and return one representing
> the outerScript.
> To create the others you need to walk the list of innerScripts and
> compare the source ranges (baseLineNumber, lineExtent) to the
> webmonkey.js and your list of actual sources with their line ranges.
> Divvy them up.

Alright. Haven't dealt with line numbers specifics yet but i suppose
it'll make sense when i do.


-- 
Olivier

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to