| ||||||
SummaryIncrements the reference count for a specifiedJSPrincipals struct.
| ||||||
SyntaxJSPRINCIPALS_HOLD(cx, principals) | ||||||
DescriptionJSPRINCIPALS_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.
| ||||||
ExampleThe 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
|