AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry:     JS_EvaluateUCScriptForPrincipals (Function)
Summary:     Compiles and executes a security-enabled,Unicode-encoded character script.
Syntax:
JSBool JS_EvaluateScriptUCForPrincipals(JSContext *cx,
JSObject *obj, JSPrincipals *principals, const jschar *chars,
uintN length, const char *filename, uintN lineno,
jsval *rval);

     Argument     Type     Description
     cx     JSContext *     JS context in which the script compiles and executes.
                 
     obj     JSObject *     Object with which the script is associated.
                 
     principals     JSPrincipals *     Pointer to the structure holding the security information for this script.
                 
     chars     const jschar *     Unicode-encoded character array containing the script to compile and execute.
                 
     length     uintN     Size, in Unicode characters, of the script to compile and execute.
                 
     filename     const char *     Name of file or URL containing the script. Used to report filename or URL in error messages.
                 
     lineno     uintN     Line number. Used to report the offending line in the file or URL if an error occurs.
                 
     rval     jsval *     Pointer to the value from the last executed expression statement processed in the script.
                 
Description:
JS_EvaluateUCScriptForPrincipals compiles and executes a Unicode-encoded script associated with a JS object, obj. On successful completion, rval is a pointer to a variable that holds the value from the last executed expression statement processed in the script.

principals is a pointer to the JSPrincipals structure that contains the security information to associate with this script.

chars is the Unicode-encoded character array containing the text of the script. length indicates the number of characters in the text version of the script.

filename is the name of the file (or URL) containing the script. This information is included in messages if an eror occurs during compilation. Similarly, lineno is used to report the line number of the script or file where an error occurred during compilation.

If a secure script compiles and executes successfully, JS_EvaluateUCScriptForPrincipals returns JS_TRUE. Otherwise it returns JS_FALSE. On failure, your application should assume that rval is undefined.


See also:
JS_CompileFile
JS_CompileScript
JS_DecompileScript
JS_DestroyScript
JS_EvaluateScript
JS_EvaluateScriptForPrincipals
JS_EvaluateUCScript
JS_ExecuteScript

[sh-index] Back to list of manuals