> 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.
>> So I could bracket these calls with beginCompile/endCompile and you'd
>> be ok right?
> I'm not sure what you mean here.
jsd_BeginCompile(...); // set the current compilation unit
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.
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....