Bug 627943 - Bad ordering of exception save/wrap/restore, r=gal

--HG--
extra : rebase_source : c317f6f3357885077c7182834d3b29412a5606f2
This commit is contained in:
Steve Fink 2011-01-21 17:32:00 -08:00
parent d2d16afad0
commit 82dbc5d4cf

View File

@ -1305,13 +1305,14 @@ nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS* wrapper, uint16 methodIndex,
cx = nsnull;
}
AutoScriptEvaluate scriptEval(cx);
js::AutoValueVector args(cx);
/* This must come before AutoScriptEvaluate */
JSAutoEnterCompartment ac;
AutoScriptEvaluate scriptEval(cx);
ContextPrincipalGuard principalGuard(ccx);
obj = thisObj = wrapper->GetJSObject();
JSAutoEnterCompartment ac;
if (!ac.enter(ccx, obj))
goto pre_call_clean_up;