JS GetSecurityCallbacks

This article covers features introduced in SpiderMonkey 1.8.1

Configure SpiderMonkey security hooks.

Syntax

struct JSSecurityCallbacks {
    JSCheckAccessOp            checkObjectAccess;
    JSCSPEvalChecker           contentSecurityPolicyAllows; Added in SpiderMonkey 1.8.5
    JSPrincipalsTranscoder     principalsTranscoder; Obsolete since JSAPI 13
    JSObjectPrincipalsFinder   findObjectPrincipals; Obsolete since JSAPI 13
};

JSSecurityCallbacks * JS_GetSecurityCallbacks(JSRuntime *rt); Added in SpiderMonkey 13

JSSecurityCallbacks * JS_SetSecurityCallbacks(JSRuntime *rt, JSSecurityCallbacks *callbacks); Added in SpiderMonkey 13

JSSecurityCallbacks * JS_SetContextSecurityCallbacks(JSContext *cx, JSSecurityCallbacks *callbacks); Obsolete since JSAPI 13

JSSecurityCallbacks * JS_GetRuntimeSecurityCallbacks(JSRuntime *rt); Obsolete since JSAPI 13

JSSecurityCallbacks * JS_SetRuntimeSecurityCallbacks(JSRuntime *rt, JSSecurityCallbacks *callbacks); Obsolete since JSAPI 13

Description

Allows the embedding to control certain aspects of JS code execution based on security settings of the global object the code is executed in.

The specifics are described in the callbacks' documentation.

MXR ID Search for JS_GetSecurityCallbacks

MXR ID Search for JS_SetSecurityCallbacks

Document Tags and Contributors

Contributors to this page: tschneidereit, Jorend
Last updated by: tschneidereit,