typedef JSBool (*JSPrincipalsTranscoder)(JSXDRState *xdr, JSPrincipals **principalsp);
| || ||The XDR reader/writer.|
| || ||If |
Each script function is associated with principals, which poses a problem for XDR. The application provides the
JSPrincipals objects, so it must also provide a
JSPrincipalsTranscoder if it intends to serialize or deserialize principals.
The callback XDR-encodes or -decodes a principals instance, based on whether
JSXDR_ENCODE, in which case
*principalsp should be encoded; or
JSXDR_DECODE, in which case implementations must return a held (via
*principalsp out parameter. Return
JS_TRUE on success,
JS_FALSE on any error, which the implementation must have reported.