Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIScriptContext Class Reference

It is used by the application to initialize a runtime and run scripts. More...

#include <nsIScriptContext.h>

Inheritance diagram for nsIScriptContext:
Inheritance graph
[legend]
Collaboration diagram for nsIScriptContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual nsresult EvaluateString (const nsAString &aScript, void *aScopeObject, nsIPrincipal *aPrincipal, const char *aURL, PRUint32 aLineNo, const char *aVersion, nsAString *aRetValue, PRBool *aIsUndefined)=0
 Compile and execute a script.
virtual nsresult EvaluateStringWithValue (const nsAString &aScript, void *aScopeObject, nsIPrincipal *aPrincipal, const char *aURL, PRUint32 aLineNo, const char *aVersion, void *aRetValue, PRBool *aIsUndefined)=0
virtual nsresult CompileScript (const PRUnichar *aText, PRInt32 aTextLength, void *aScopeObject, nsIPrincipal *aPrincipal, const char *aURL, PRUint32 aLineNo, const char *aVersion, void **aScriptObject)=0
 Compile a script.
virtual nsresult ExecuteScript (void *aScriptObject, void *aScopeObject, nsAString *aRetValue, PRBool *aIsUndefined)=0
 Execute a precompiled script object.
virtual nsresult CompileEventHandler (void *aTarget, nsIAtom *aName, const char *aEventName, const nsAString &aBody, const char *aURL, PRUint32 aLineNo, PRBool aShared, void **aHandler)=0
 Compile the event handler named by atom aName, with function body aBody into a function object returned if ok via *aHandler.
virtual nsresult CallEventHandler (JSObject *aTarget, JSObject *aHandler, uintN argc, jsval *argv, jsval *rval)=0
 Call the function object with given args and return its boolean result, or true if the result isn't boolean.
virtual nsresult BindCompiledEventHandler (void *aTarget, nsIAtom *aName, void *aHandler)=0
 Bind an already-compiled event handler function to a name in the given scope object.
virtual nsresult CompileFunction (void *aTarget, const nsACString &aName, PRUint32 aArgCount, const char **aArgArray, const nsAString &aBody, const char *aURL, PRUint32 aLineNo, PRBool aShared, void **aFunctionObject)=0
virtual void SetDefaultLanguageVersion (const char *aVersion)=0
 Set the default scripting language version for this context, which must be a context specific to a particular scripting language.
virtual nsIScriptGlobalObjectGetGlobalObject ()=0
 Return the global object.
virtual voidGetNativeContext ()=0
 Return the native script context.
virtual nsresult InitContext (nsIScriptGlobalObject *aGlobalObject)=0
 Init this context.
virtual PRBool IsContextInitialized ()=0
 Check to see if context is as yet intialized.
virtual void GC ()=0
 For garbage collected systems, do a synchronous collection pass.
virtual void ScriptEvaluated (PRBool aTerminated)=0
 Inform the context that a script was evaluated.
virtual void SetOwner (nsIScriptContextOwner *owner)=0
 Let the script context know who its owner is.
virtual nsIScriptContextOwnerGetOwner ()=0
 Get the script context of the owner.
virtual nsresult SetTerminationFunction (nsScriptTerminationFunc aFunc, nsISupports *aRef)=0
 Called to specify a function that should be called when the current script (if there is one) terminates.
virtual PRBool GetScriptsEnabled ()=0
 Called to disable/enable script execution in this context.
virtual void SetScriptsEnabled (PRBool aEnabled, PRBool aFireTimeouts)=0
virtual PRBool GetProcessingScriptTag ()=0
 Called to set/get information if the script context is currently processing a script tag.
virtual void SetProcessingScriptTag (PRBool aResult)=0
virtual void SetGCOnDestruction (PRBool aGCOnDestruction)=0
 Tell the context whether or not to GC when destroyed.
virtual nsresult InitClasses (JSObject *aGlobalObj)=0
 Initialize DOM classes on aGlobalObj, always call WillInitializeContext() before calling InitContext(), and always call DidInitializeContext() when a context is fully (successfully) initialized.
virtual void WillInitializeContext ()=0
 Tell the context we're about to be reinitialize it.
virtual void DidInitializeContext ()=0
 Dell the context we're done reinitializing it.
virtual nsresult EvaluateString (const nsAString &aScript, void *aScopeObject, nsIPrincipal *aPrincipal, const char *aURL, PRUint32 aLineNo, const char *aVersion, nsAString *aRetValue, PRBool *aIsUndefined)=0
 Compile and execute a script.
virtual nsresult EvaluateStringWithValue (const nsAString &aScript, void *aScopeObject, nsIPrincipal *aPrincipal, const char *aURL, PRUint32 aLineNo, const char *aVersion, void *aRetValue, PRBool *aIsUndefined)=0
virtual nsresult CompileScript (const PRUnichar *aText, PRInt32 aTextLength, void *aScopeObject, nsIPrincipal *aPrincipal, const char *aURL, PRUint32 aLineNo, const char *aVersion, void **aScriptObject)=0
 Compile a script.
virtual nsresult ExecuteScript (void *aScriptObject, void *aScopeObject, nsAString *aRetValue, PRBool *aIsUndefined)=0
 Execute a precompiled script object.
virtual nsresult CompileEventHandler (void *aTarget, nsIAtom *aName, const char *aEventName, const nsAString &aBody, const char *aURL, PRUint32 aLineNo, PRBool aShared, void **aHandler)=0
 Compile the event handler named by atom aName, with function body aBody into a function object returned if ok via *aHandler.
virtual nsresult CallEventHandler (JSObject *aTarget, JSObject *aHandler, uintN argc, jsval *argv, jsval *rval)=0
 Call the function object with given args and return its boolean result, or true if the result isn't boolean.
virtual nsresult BindCompiledEventHandler (void *aTarget, nsIAtom *aName, void *aHandler)=0
 Bind an already-compiled event handler function to a name in the given scope object.
virtual nsresult CompileFunction (void *aTarget, const nsACString &aName, PRUint32 aArgCount, const char **aArgArray, const nsAString &aBody, const char *aURL, PRUint32 aLineNo, PRBool aShared, void **aFunctionObject)=0
virtual void SetDefaultLanguageVersion (const char *aVersion)=0
 Set the default scripting language version for this context, which must be a context specific to a particular scripting language.
virtual nsIScriptGlobalObjectGetGlobalObject ()=0
 Return the global object.
virtual voidGetNativeContext ()=0
 Return the native script context.
virtual nsresult InitContext (nsIScriptGlobalObject *aGlobalObject)=0
 Init this context.
virtual PRBool IsContextInitialized ()=0
 Check to see if context is as yet intialized.
virtual void GC ()=0
 For garbage collected systems, do a synchronous collection pass.
virtual void ScriptEvaluated (PRBool aTerminated)=0
 Inform the context that a script was evaluated.
virtual void SetOwner (nsIScriptContextOwner *owner)=0
 Let the script context know who its owner is.
virtual nsIScriptContextOwnerGetOwner ()=0
 Get the script context of the owner.
virtual nsresult SetTerminationFunction (nsScriptTerminationFunc aFunc, nsISupports *aRef)=0
 Called to specify a function that should be called when the current script (if there is one) terminates.
virtual PRBool GetScriptsEnabled ()=0
 Called to disable/enable script execution in this context.
virtual void SetScriptsEnabled (PRBool aEnabled, PRBool aFireTimeouts)=0
virtual PRBool GetProcessingScriptTag ()=0
 Called to set/get information if the script context is currently processing a script tag.
virtual void SetProcessingScriptTag (PRBool aResult)=0
virtual void SetGCOnDestruction (PRBool aGCOnDestruction)=0
 Tell the context whether or not to GC when destroyed.
virtual nsresult InitClasses (JSObject *aGlobalObj)=0
 Initialize DOM classes on aGlobalObj, always call WillInitializeContext() before calling InitContext(), and always call DidInitializeContext() when a context is fully (successfully) initialized.
virtual void WillInitializeContext ()=0
 Tell the context we're about to be reinitialize it.
virtual void DidInitializeContext ()=0
 Dell the context we're done reinitializing it.

Detailed Description

It is used by the application to initialize a runtime and run scripts.

A script runtime would implement this interface.

It does have a bit too much java script information now, that should be removed in a short time. Ideally this interface will be language neutral

Definition at line 67 of file nsIScriptContext.h.


Member Function Documentation

virtual nsresult nsIScriptContext::BindCompiledEventHandler ( void aTarget,
nsIAtom aName,
void aHandler 
) [pure virtual]

Bind an already-compiled event handler function to a name in the given scope object.

The same restrictions on aName (lowercase ASCII, not too long) applies here as for CompileEventHandler. Scripting languages with static scoping must re-bind the scope chain for aHandler to begin (after the activation scope for aHandler itself, typically) with aTarget's scope.

Parameters:
aTargetan object telling the scope in which to bind the compiled event handler function.
aNamean nsIAtom pointer naming the function; it must be lowercase and ASCII, and should not be longer than 63 chars. This bound on length is enforced only by assertions, so caveat caller!
aHandlerthe function object to name, created by an earlier call to CompileEventHandler
Returns:
NS_OK if the function was successfully bound to the name

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual nsresult nsIScriptContext::BindCompiledEventHandler ( void aTarget,
nsIAtom aName,
void aHandler 
) [pure virtual]

Bind an already-compiled event handler function to a name in the given scope object.

The same restrictions on aName (lowercase ASCII, not too long) applies here as for CompileEventHandler. Scripting languages with static scoping must re-bind the scope chain for aHandler to begin (after the activation scope for aHandler itself, typically) with aTarget's scope.

Parameters:
aTargetan object telling the scope in which to bind the compiled event handler function.
aNamean nsIAtom pointer naming the function; it must be lowercase and ASCII, and should not be longer than 63 chars. This bound on length is enforced only by assertions, so caveat caller!
aHandlerthe function object to name, created by an earlier call to CompileEventHandler
Returns:
NS_OK if the function was successfully bound to the name

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::CallEventHandler ( JSObject aTarget,
JSObject aHandler,
uintN  argc,
jsval argv,
jsval rval 
) [pure virtual]

Call the function object with given args and return its boolean result, or true if the result isn't boolean.

Parameters:
aTargetan object telling the scope in which to bind the compiled event handler function.
aHandlerfunction object (function and static scope) to invoke.
argcactual argument count; length of argv
argvvector of arguments; length is argc
aBoolResultout parameter returning boolean function result, or true if the result was not boolean.

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::CallEventHandler ( JSObject aTarget,
JSObject aHandler,
uintN  argc,
jsval argv,
jsval rval 
) [pure virtual]

Call the function object with given args and return its boolean result, or true if the result isn't boolean.

Parameters:
aTargetan object telling the scope in which to bind the compiled event handler function.
aHandlerfunction object (function and static scope) to invoke.
argcactual argument count; length of argv
argvvector of arguments; length is argc
aBoolResultout parameter returning boolean function result, or true if the result was not boolean.

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::CompileEventHandler ( void aTarget,
nsIAtom aName,
const char *  aEventName,
const nsAString &  aBody,
const char *  aURL,
PRUint32  aLineNo,
PRBool  aShared,
void **  aHandler 
) [pure virtual]

Compile the event handler named by atom aName, with function body aBody into a function object returned if ok via *aHandler.

Bind the lowercase ASCII name to the function in its parent object aTarget.

Parameters:
aTargetan object telling the scope in which to bind the compiled event handler function to aName.
aNamean nsIAtom pointer naming the function; it must be lowercase and ASCII, and should not be longer than 63 chars. This bound on length is enforced only by assertions, so caveat caller!
aEventNamethe name that the event object should be bound to
aBodythe event handler function's body
aURLthe URL or filename for error messages
aLineNothe starting line number of the script for error messages
aSharedflag telling whether the compiled event handler will be shared via nsIScriptEventHandlerOwner, in which case any static link compiled into it based on aTarget should be cleared, both to avoid entraining garbage to be collected, and to trigger static link re-binding in BindCompiledEventHandler (see below).
aHandlerthe out parameter in which a void pointer to the compiled function object is returned on success; may be null, meaning the caller doesn't need to store the handler for later use.
Returns:
NS_OK if the function body was valid and got compiled

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual nsresult nsIScriptContext::CompileEventHandler ( void aTarget,
nsIAtom aName,
const char *  aEventName,
const nsAString &  aBody,
const char *  aURL,
PRUint32  aLineNo,
PRBool  aShared,
void **  aHandler 
) [pure virtual]

Compile the event handler named by atom aName, with function body aBody into a function object returned if ok via *aHandler.

Bind the lowercase ASCII name to the function in its parent object aTarget.

Parameters:
aTargetan object telling the scope in which to bind the compiled event handler function to aName.
aNamean nsIAtom pointer naming the function; it must be lowercase and ASCII, and should not be longer than 63 chars. This bound on length is enforced only by assertions, so caveat caller!
aEventNamethe name that the event object should be bound to
aBodythe event handler function's body
aURLthe URL or filename for error messages
aLineNothe starting line number of the script for error messages
aSharedflag telling whether the compiled event handler will be shared via nsIScriptEventHandlerOwner, in which case any static link compiled into it based on aTarget should be cleared, both to avoid entraining garbage to be collected, and to trigger static link re-binding in BindCompiledEventHandler (see below).
aHandlerthe out parameter in which a void pointer to the compiled function object is returned on success; may be null, meaning the caller doesn't need to store the handler for later use.
Returns:
NS_OK if the function body was valid and got compiled

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::CompileFunction ( void aTarget,
const nsACString &  aName,
PRUint32  aArgCount,
const char **  aArgArray,
const nsAString &  aBody,
const char *  aURL,
PRUint32  aLineNo,
PRBool  aShared,
void **  aFunctionObject 
) [pure virtual]

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual nsresult nsIScriptContext::CompileFunction ( void aTarget,
const nsACString &  aName,
PRUint32  aArgCount,
const char **  aArgArray,
const nsAString &  aBody,
const char *  aURL,
PRUint32  aLineNo,
PRBool  aShared,
void **  aFunctionObject 
) [pure virtual]

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::CompileScript ( const PRUnichar aText,
PRInt32  aTextLength,
void aScopeObject,
nsIPrincipal aPrincipal,
const char *  aURL,
PRUint32  aLineNo,
const char *  aVersion,
void **  aScriptObject 
) [pure virtual]

Compile a script.

Parameters:
aTexta PRUnichar buffer containing script source
aTextLengthnumber of characters in aText
aScopeObjectan object telling the scope in which to execute, or nsnull to use a default scope
aPrincipalthe principal that produced the script
aURLthe URL or filename for error messages
aLineNothe starting line number of the script for error messages
aVersionthe script language version to use when executing
aScriptObjectan executable object that's the result of compiling the script. The caller is responsible for GC rooting this object.
Returns:
NS_OK if the script source was valid and got compiled

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual nsresult nsIScriptContext::CompileScript ( const PRUnichar aText,
PRInt32  aTextLength,
void aScopeObject,
nsIPrincipal aPrincipal,
const char *  aURL,
PRUint32  aLineNo,
const char *  aVersion,
void **  aScriptObject 
) [pure virtual]

Compile a script.

Parameters:
aTexta PRUnichar buffer containing script source
aTextLengthnumber of characters in aText
aScopeObjectan object telling the scope in which to execute, or nsnull to use a default scope
aPrincipalthe principal that produced the script
aURLthe URL or filename for error messages
aLineNothe starting line number of the script for error messages
aVersionthe script language version to use when executing
aScriptObjectan executable object that's the result of compiling the script. The caller is responsible for GC rooting this object.
Returns:
NS_OK if the script source was valid and got compiled

Implemented in nsJSContext.

virtual void nsIScriptContext::DidInitializeContext ( ) [pure virtual]

Dell the context we're done reinitializing it.

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual void nsIScriptContext::DidInitializeContext ( ) [pure virtual]

Dell the context we're done reinitializing it.

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::EvaluateString ( const nsAString &  aScript,
void aScopeObject,
nsIPrincipal aPrincipal,
const char *  aURL,
PRUint32  aLineNo,
const char *  aVersion,
nsAString *  aRetValue,
PRBool aIsUndefined 
) [pure virtual]

Compile and execute a script.

Parameters:
aScripta string representing the script to be executed
aScopeObjecta JavaScript JSObject for the scope to execute in, or nsnull to use a default scope
aPrincipalthe principal that produced the script
aURLthe URL or filename for error messages
aLineNothe starting line number of the script for error messages
aVersionthe script language version to use when executing
aRetValuethe result of executing the script, or null for no result. If this is a JS context, it's the caller's responsibility to preserve aRetValue from GC across this call
aIsUndefinedtrue if the result of executing the script is the undefined value
Returns:
NS_OK if the script was valid and got executed

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual nsresult nsIScriptContext::EvaluateString ( const nsAString &  aScript,
void aScopeObject,
nsIPrincipal aPrincipal,
const char *  aURL,
PRUint32  aLineNo,
const char *  aVersion,
nsAString *  aRetValue,
PRBool aIsUndefined 
) [pure virtual]

Compile and execute a script.

Parameters:
aScripta string representing the script to be executed
aScopeObjecta JavaScript JSObject for the scope to execute in, or nsnull to use a default scope
aPrincipalthe principal that produced the script
aURLthe URL or filename for error messages
aLineNothe starting line number of the script for error messages
aVersionthe script language version to use when executing
aRetValuethe result of executing the script, or null for no result. If this is a JS context, it's the caller's responsibility to preserve aRetValue from GC across this call
aIsUndefinedtrue if the result of executing the script is the undefined value
Returns:
NS_OK if the script was valid and got executed

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::EvaluateStringWithValue ( const nsAString &  aScript,
void aScopeObject,
nsIPrincipal aPrincipal,
const char *  aURL,
PRUint32  aLineNo,
const char *  aVersion,
void aRetValue,
PRBool aIsUndefined 
) [pure virtual]

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::EvaluateStringWithValue ( const nsAString &  aScript,
void aScopeObject,
nsIPrincipal aPrincipal,
const char *  aURL,
PRUint32  aLineNo,
const char *  aVersion,
void aRetValue,
PRBool aIsUndefined 
) [pure virtual]

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::ExecuteScript ( void aScriptObject,
void aScopeObject,
nsAString *  aRetValue,
PRBool aIsUndefined 
) [pure virtual]

Execute a precompiled script object.

Parameters:
aScriptObjectan object representing the script to be executed
aScopeObjectan object telling the scope in which to execute, or nsnull to use a default scope
aRetValuethe result of executing the script, may be null in which case no result string is computed
aIsUndefinedtrue if the result of executing the script is the undefined value, may be null for "don't care"
Returns:
NS_OK if the script was valid and got executed

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::ExecuteScript ( void aScriptObject,
void aScopeObject,
nsAString *  aRetValue,
PRBool aIsUndefined 
) [pure virtual]

Execute a precompiled script object.

Parameters:
aScriptObjectan object representing the script to be executed
aScopeObjectan object telling the scope in which to execute, or nsnull to use a default scope
aRetValuethe result of executing the script, may be null in which case no result string is computed
aIsUndefinedtrue if the result of executing the script is the undefined value, may be null for "don't care"
Returns:
NS_OK if the script was valid and got executed

Implemented in nsJSContext.

virtual void nsIScriptContext::GC ( ) [pure virtual]

For garbage collected systems, do a synchronous collection pass.

May be a no-op on other systems

Returns:
NS_OK if the method is successful

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual void nsIScriptContext::GC ( ) [pure virtual]

For garbage collected systems, do a synchronous collection pass.

May be a no-op on other systems

Returns:
NS_OK if the method is successful

Implemented in nsJSContext.

Return the global object.

Implemented in nsJSContext.

Here is the caller graph for this function:

Return the global object.

Implemented in nsJSContext.

virtual void* nsIScriptContext::GetNativeContext ( ) [pure virtual]

Return the native script context.

Implemented in nsJSContext.

virtual void* nsIScriptContext::GetNativeContext ( ) [pure virtual]

Return the native script context.

Implemented in nsJSContext.

Get the script context of the owner.

The method addrefs the returned reference according to regular XPCOM rules, even though the internal reference itself is a "weak" reference.

Implemented in nsJSContext.

Get the script context of the owner.

The method addrefs the returned reference according to regular XPCOM rules, even though the internal reference itself is a "weak" reference.

Implemented in nsJSContext.

Called to set/get information if the script context is currently processing a script tag.

Implemented in nsJSContext.

Here is the caller graph for this function:

Called to set/get information if the script context is currently processing a script tag.

Implemented in nsJSContext.

virtual PRBool nsIScriptContext::GetScriptsEnabled ( ) [pure virtual]

Called to disable/enable script execution in this context.

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual PRBool nsIScriptContext::GetScriptsEnabled ( ) [pure virtual]

Called to disable/enable script execution in this context.

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::InitClasses ( JSObject aGlobalObj) [pure virtual]

Initialize DOM classes on aGlobalObj, always call WillInitializeContext() before calling InitContext(), and always call DidInitializeContext() when a context is fully (successfully) initialized.

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual nsresult nsIScriptContext::InitClasses ( JSObject aGlobalObj) [pure virtual]

Initialize DOM classes on aGlobalObj, always call WillInitializeContext() before calling InitContext(), and always call DidInitializeContext() when a context is fully (successfully) initialized.

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::InitContext ( nsIScriptGlobalObject aGlobalObject) [pure virtual]

Init this context.

Parameters:
aGlobalObjectthe gobal object
Returns:
NS_OK if context initialization was successful

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual nsresult nsIScriptContext::InitContext ( nsIScriptGlobalObject aGlobalObject) [pure virtual]

Init this context.

Parameters:
aGlobalObjectthe gobal object
Returns:
NS_OK if context initialization was successful

Implemented in nsJSContext.

virtual PRBool nsIScriptContext::IsContextInitialized ( ) [pure virtual]

Check to see if context is as yet intialized.

Used to prevent reentrancy issues during the initialization process.

Returns:
PR_TRUE if initialized, PR_FALSE if not

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual PRBool nsIScriptContext::IsContextInitialized ( ) [pure virtual]

Check to see if context is as yet intialized.

Used to prevent reentrancy issues during the initialization process.

Returns:
PR_TRUE if initialized, PR_FALSE if not

Implemented in nsJSContext.

virtual void nsIScriptContext::ScriptEvaluated ( PRBool  aTerminated) [pure virtual]

Inform the context that a script was evaluated.

A GC may be done if "necessary." This call is necessary if script evaluation is done without using the EvaluateScript method.

Parameters:
aTerminatedIf true then call termination function if it was previously set. Within DOM this will always be true, but outside callers (such as xpconnect) who may do script evaluations nested inside DOM script evaluations can pass false to avoid premature calls to the termination function.
Returns:
NS_OK if the method is successful

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual void nsIScriptContext::ScriptEvaluated ( PRBool  aTerminated) [pure virtual]

Inform the context that a script was evaluated.

A GC may be done if "necessary." This call is necessary if script evaluation is done without using the EvaluateScript method.

Parameters:
aTerminatedIf true then call termination function if it was previously set. Within DOM this will always be true, but outside callers (such as xpconnect) who may do script evaluations nested inside DOM script evaluations can pass false to avoid premature calls to the termination function.
Returns:
NS_OK if the method is successful

Implemented in nsJSContext.

virtual void nsIScriptContext::SetDefaultLanguageVersion ( const char *  aVersion) [pure virtual]

Set the default scripting language version for this context, which must be a context specific to a particular scripting language.

Implemented in nsJSContext.

virtual void nsIScriptContext::SetDefaultLanguageVersion ( const char *  aVersion) [pure virtual]

Set the default scripting language version for this context, which must be a context specific to a particular scripting language.

Implemented in nsJSContext.

virtual void nsIScriptContext::SetGCOnDestruction ( PRBool  aGCOnDestruction) [pure virtual]

Tell the context whether or not to GC when destroyed.

Implemented in nsJSContext.

virtual void nsIScriptContext::SetGCOnDestruction ( PRBool  aGCOnDestruction) [pure virtual]

Tell the context whether or not to GC when destroyed.

Implemented in nsJSContext.

virtual void nsIScriptContext::SetOwner ( nsIScriptContextOwner owner) [pure virtual]

Let the script context know who its owner is.

The script context should not addref the owner. It will be told when the owner goes away.

Returns:
NS_OK if the method is successful

Implemented in nsJSContext.

virtual void nsIScriptContext::SetOwner ( nsIScriptContextOwner owner) [pure virtual]

Let the script context know who its owner is.

The script context should not addref the owner. It will be told when the owner goes away.

Returns:
NS_OK if the method is successful

Implemented in nsJSContext.

virtual void nsIScriptContext::SetProcessingScriptTag ( PRBool  aResult) [pure virtual]

Implemented in nsJSContext.

virtual void nsIScriptContext::SetProcessingScriptTag ( PRBool  aResult) [pure virtual]

Implemented in nsJSContext.

virtual void nsIScriptContext::SetScriptsEnabled ( PRBool  aEnabled,
PRBool  aFireTimeouts 
) [pure virtual]

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual void nsIScriptContext::SetScriptsEnabled ( PRBool  aEnabled,
PRBool  aFireTimeouts 
) [pure virtual]

Implemented in nsJSContext.

virtual nsresult nsIScriptContext::SetTerminationFunction ( nsScriptTerminationFunc  aFunc,
nsISupports *  aRef 
) [pure virtual]

Called to specify a function that should be called when the current script (if there is one) terminates.

Generally used if breakdown of script state needs to happen, but should be deferred till the end of script evaluation.

Exceptions:
NS_ERROR_OUT_OF_MEMORYif that happens

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual nsresult nsIScriptContext::SetTerminationFunction ( nsScriptTerminationFunc  aFunc,
nsISupports *  aRef 
) [pure virtual]

Called to specify a function that should be called when the current script (if there is one) terminates.

Generally used if breakdown of script state needs to happen, but should be deferred till the end of script evaluation.

Exceptions:
NS_ERROR_OUT_OF_MEMORYif that happens

Implemented in nsJSContext.

virtual void nsIScriptContext::WillInitializeContext ( ) [pure virtual]

Tell the context we're about to be reinitialize it.

Implemented in nsJSContext.

Here is the caller graph for this function:

virtual void nsIScriptContext::WillInitializeContext ( ) [pure virtual]

Tell the context we're about to be reinitialize it.

Implemented in nsJSContext.


The documentation for this class was generated from the following file: