Bug 630471 - Enter compartment when creating XPC stack frame, before JS_PCToLineNumber (r=gal)

This commit is contained in:
Steve Fink 2011-02-03 11:29:16 -08:00
parent 7b5ff04357
commit 8d967375c9

View File

@ -159,6 +159,9 @@ XPCJSStackFrame::CreateStack(JSContext* cx, JSStackFrame* fp,
JSScript* script = JS_GetFrameScript(cx, fp);
jsbytecode* pc = JS_GetFramePC(cx, fp);
if(script && pc)
{
JSAutoEnterCompartment ac;
if(ac.enter(cx, script))
{
const char* filename = JS_GetScriptFilename(cx, script);
if(filename)
@ -190,6 +193,7 @@ XPCJSStackFrame::CreateStack(JSContext* cx, JSStackFrame* fp,
}
}
}
}
else
{
self->mLanguage = nsIProgrammingLanguage::CPLUSPLUS;