Search completed in 1.14 seconds.
3 results for "jsprincipals_drop":
JSPRINCIPALS_HOLD
Mozilla › Projects › SpiderMonkey › JSAPI reference › JSPRINCIPALS HOLD
Obsolete since JSAPI 13This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. Increment or decrement the reference count of a JSPrincipals object. Syntax JSPRINCIPALS_HOLD(cx, principals) JSPRINCIPALS_DROP(cx, principals) Name Type Description cx JSContext * A context. principals JSPrincipals * Pointer to the JSPrincipals object to hold or drop. This argument must not be NULL. Description JSPRINCIPALS_HOLD and JSPRINCIPALS_DROP are used to manage memory for JSPrincipals objects. Principals are used by the SpiderMonkey security system. JSPrincipals objects are not JSObjects. They are reference counted, not garbage collected. Application code...
...ot be NULL. Description JSPRINCIPALS_HOLD and JSPRINCIPALS_DROP are used to manage memory for JSPrincipals objects. Principals are used by the SpiderMonkey security system. JSPrincipals objects are not JSObjects. They are reference counted, not garbage collected. Application code that stores a pointer to a JSPrincipals object must call JSPRINCIPALS_HOLD(cx, principals) before storing it and JSPRINCIPALS_DROP(cx, principals) when done with it. JSPRINCIPALS_HOLD(cx, principals) increments the reference count of principals by 1. JSPRINCIPALS_DROP(cx, principals) decrements the reference count of principals by 1. If the reference count drops to 0, indicating that no one is using the object anymore, JSPRINCIPALS_DROP also deallocates principals by calling its destroy method. See Also bug 728250 ...
Index
Mozilla › Projects › SpiderMonkey › Index
, and otherwise take special steps. See js_SetPrototype or js_SetParent in js/src/jsobj.cpp for an example. 141 JSObjectPrincipalsFinder JSAPI Reference, Obsolete, SpiderMonkey The JavaScript engine calls this callback to obtain principals for a JSPrincipals.subsume check. 142 JSPRINCIPALS_HOLD JSAPI Reference, Obsolete, SpiderMonkey JSPRINCIPALS_HOLD and JSPRINCIPALS_DROP are used to manage memory for JSPrincipals objects. 143 JSPrincipals JSAPI Reference, Reference, Reference(2), SpiderMonkey JSPrincipals is the abstract base class of all principals objects, the objects that identify the source of a function or script and are used to determine its privileges. A principals object is like a Java CodeSource. 144 JSPrincipalsTranscoder...
JSPrincipals
Mozilla › Projects › SpiderMonkey › JSAPI reference › JSPrincipals
hether principals are enabled globally. refcount 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 JSPRINCIPALS_HOLD macro to increment refcount, and use JSPRINCIPALS_DROP to decrement refcount. See Also MXR ID Search for JSPrincipals JS_NewGlobalObject JS_HoldPrincipals JS_DropPrincipals bug 715417 - removed getPrincipalArray and globalPrivilegesEnabled bug 728250 - added dump method, removed codebase, destroy, and subsume properties bug 884676 - changed refcount type to mozilla::Atomic ...