Search completed in 1.14 seconds.
1 results for "js_holdprincipals":
JSPrincipals
Mozilla › Projects › SpiderMonkey › JSAPI reference › JSPrincipals
codebase char * Pointer to the codebase for the principal. Obsolete since JSAPI 13 getPrincipalArray void * (*)(JSContext *, JSPrincipals *) Pointer to the function that returns an array of principal definitions. Obsolete since JSAPI 12 globalPrivilegesEnabled JSBool (*)(JSContext *, JSPrincipals *) Flag indicating whether principals are enabled globally. ...
...sed into the JS engine through the JS_NewGlobalObject function. JSPrincipals has refcount property that is the reference count. This is used for memory management. Each time an object is referenced, refcount must be increased by one. Each time an object is dereferenced, refcount must be decremented by one. When refcount reaches zero, the principals are no longer in use and are destroyed. Use the JS_HoldPrincipals to increment refcount, and use JS_DropPrincipals to decrement refcount. Obsolete. The data content of a principals object is defined by the application, which creates instances of JSPrincipals, initializes their refcount fields to 1, and passes them into the engine through the JS_...ForPrincipals functions. Some examples of security-enhanced API call are JS_CompileScriptForPrincipals, JS_Compi...
...t. Each time an object is referenced, refcount must be increased by one. Each time an object is dereferenced, refcount must be decremented by one. When refcount reaches zero, the principals are no longer in use and are destroyed. ...