Implement jsdICompilationUnit

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Implement jsdICompilationUnit

John J Barton
Boris Zbarsky wrote:

> On 12/8/09 6:05 PM, John J Barton wrote:
>> So for these cases the text is compiled but no script is executed as far
>> as I can see.
>
> Yes...
>
>> So I could bracket these calls with beginCompile/endCompile and you'd
>> be ok right?
>
> I'm not sure what you mean here.

Like
      jsd_BeginCompile(...);  // set the current compilation unit
      compile.
      jsd_EndCompile(...);    // close the current compilation unit

>
>> The problem case call JS_EvaluateUCScriptForPrincipals(), because the
>> endCompile would need to be in that method because the outerScript is
>> called before the method returns. So if there are cases where your
>> compile call site passes through this guy its an issue.
>
> Sure there are.  <script> elements, say.

Yes, does your definition of 'compile call site' include the execute
part of JS_EvaluateUCScriptForPrincipals() or just the compile part? I
need to put a function call in between.

jjb
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Implement jsdICompilationUnit

Boris Zbarsky
On 12/8/09 10:25 PM, John J. Barton wrote:
> Yes, does your definition of 'compile call site' include the execute
> part of JS_EvaluateUCScriptForPrincipals() or just the compile part? I
> need to put a function call in between.

Any caller of JS_EvaluateUCScriptForPrincipals had better be safe
against script running during that call, so doesn't worry me.  It's
callers of pure-compilation APIs that are concerning me....

-Boris
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
12