Re: Implement jsdICompilationUnit
John J Barton <[email protected]> Tue, 08 Dec 2009 18:05:03 -0800
| Newsgroups | gmane.comp.mozilla.devel.jsdebugger |
|---|---|
| Message-ID | <[email protected]> |
Boris Zbarsky wrote: > On 12/8/09 4:53 PM, John J Barton wrote: >> Can you point me to the compile callsite? > > http://mxr.mozilla.org/mozilla-central/source/content/xbl/src/nsXBLProtoImplMethod.cpp#234 > > http://mxr.mozilla.org/mozilla-central/source/content/xbl/src/nsXBLProtoImplProperty.cpp#237 > > http://mxr.mozilla.org/mozilla-central/source/content/xbl/src/nsXBLProtoImplProperty.cpp#287 > > > for sure. > > Also likely: > > http://mxr.mozilla.org/mozilla-central/source/content/xul/document/src/nsXULContentSink.cpp#608 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? > > > Not sure about event handlers; can point you to those too if desired. 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. Actually its an issue anyway, since I'd much rather have the begin/end in the same function. Having the beginCompile in the caller and the endCompile in some callee is asking for trouble. jjb