JavaScript-1.5 Reference

JSPRINCIPALS_HOLD Macro

Summary

Increments the reference count for a specified JSPrincipals struct.

Syntax

JSPRINCIPALS_HOLD(cx, principals)

Description

JSPRINCIPALS_HOLD maintains the specified principals in a JSPrincipals struct, principals, for a specified JSContext, cx. Principals are used by the JS security mechanism. The hold is maintained by incrementing the reference count field in the struct by 1.

Example

The following code increments the principals reference count for the MyPrincipals struct:
JSPrincipals MyPrincipals;
JSContext * MyContext;
JSRuntime *rt;
.
.
.
rt = Js_Init(32768);
MyContext = JS_NewContext(rt, 16384);
.
.
.
JSPRINCIPALS_HOLD(MyContext, MyPrincipals);

See Also

Groups [ Macro ]
Documents [ LXR ID Search ]
Entries [ JSPRINCIPALS_DROP | JSPrincipals | JS_Init | JS_NewContext ]

This page was generated by APIDOC