Example #1
0
JS_GetFramePrincipalArray(JSContext *cx, JSStackFrame *fp)
{
    JSPrincipals *principals;

    principals = Valueify(fp)->scopeChain().principals(cx);
    if (!principals)
        return NULL;
    return principals->getPrincipalArray(cx, principals);
}
Example #2
0
JS_GetFramePrincipalArray(JSContext *cx, JSStackFrame *fp)
{
    JSPrincipals *principals;

    principals = JS_StackFramePrincipals(cx, fp);
    if (!principals)
        return NULL;
    return principals->getPrincipalArray(cx, principals);
}
Example #3
0
JS_GetFramePrincipalArray(JSContext *cx, JSStackFrame *fp)
{
    JSPrincipals *principals = fp->script
        ? fp->script->principals
        : NULL;

    return principals
        ? principals->getPrincipalArray(cx, principals)
        : NULL;
}
Example #4
0
JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fp)
{
    if (fp->annotation && fp->script) {
        JSPrincipals *principals = JS_StackFramePrincipals(cx, fp);

        if (principals && principals->globalPrivilegesEnabled(cx, principals)) {
            /*
             * Give out an annotation only if privileges have not been revoked
             * or disabled globally.
             */
            return fp->annotation;
        }
    }

    return NULL;
}
Example #5
0
JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fpArg)
{
    StackFrame *fp = Valueify(fpArg);
    if (fp->annotation() && fp->isScriptFrame()) {
        JSPrincipals *principals = fp->scopeChain().principals(cx);

        if (principals && principals->globalPrivilegesEnabled(cx, principals)) {
            /*
             * Give out an annotation only if privileges have not been revoked
             * or disabled globally.
             */
            return fp->annotation();
        }
    }

    return NULL;
}
Example #6
0
JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fp)
{
    if (fp->annotation) {
        JSPrincipals *principals = fp->script
            ? fp->script->principals
            : NULL;

        if (principals == NULL)
            return NULL;

        if (principals->globalPrivilegesEnabled(cx, principals)) {
            /*
             * Only give out an annotation if privileges have not
             * been revoked globally.
             */
            return fp->annotation;
        }
    }

    return NULL;
}