Bug 559231 - Don't assert if there's no code running. r=jst
This commit is contained in:
@@ -3556,10 +3556,12 @@ xpc_EvalInSandbox(JSContext *cx, JSObject *sandbox, const nsAString& source,
|
|||||||
{
|
{
|
||||||
nsIScriptSecurityManager *ssm = XPCWrapper::GetSecurityManager();
|
nsIScriptSecurityManager *ssm = XPCWrapper::GetSecurityManager();
|
||||||
if (ssm) {
|
if (ssm) {
|
||||||
nsIPrincipal *subjectPrincipal = ssm->GetCxSubjectPrincipal(cx);
|
JSStackFrame *fp;
|
||||||
|
nsIPrincipal *subjectPrincipal =
|
||||||
|
ssm->GetCxSubjectPrincipalAndFrame(cx, &fp);
|
||||||
PRBool system;
|
PRBool system;
|
||||||
ssm->IsSystemPrincipal(subjectPrincipal, &system);
|
ssm->IsSystemPrincipal(subjectPrincipal, &system);
|
||||||
NS_ASSERTION(system, "Bad caller!");
|
NS_ASSERTION(!fp || system, "Bad caller!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user