diff --git a/js/src/jsdbgapi.c b/js/src/jsdbgapi.c index ec0002dc8db..809ea6e69b1 100644 --- a/js/src/jsdbgapi.c +++ b/js/src/jsdbgapi.c @@ -714,10 +714,10 @@ JS_EvalFramePrincipals(JSContext *cx, JSStackFrame *fp, JSStackFrame *caller) if (!caller) return principals; callerPrincipals = JS_StackFramePrincipals(cx, caller); - return (principals && callerPrincipals && - principals->subsume(principals, callerPrincipals)) - ? callerPrincipals - : principals; + return (callerPrincipals && principals && + callerPrincipals->subsume(callerPrincipals, principals)) + ? principals + : callerPrincipals; } JS_PUBLIC_API(void *)