Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsIScriptContext.h File Reference
#include "nscore.h"
#include "nsString.h"
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "jsapi.h"

Go to the source code of this file.

Classes

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

Defines

#define NS_ISCRIPTCONTEXT_IID
#define NS_ISCRIPTCONTEXT_IID

Typedefs

typedef void(* nsScriptTerminationFunc )(nsISupports *aRef)

Functions

nsIScriptContextGetScriptContextFromJSContext (JSContext *cx)

Define Documentation

Value:
{ /* b3fd8821-b46d-4160-913f-cc8fe8176f5f */ \
  0xb3fd8821, 0xb46d, 0x4160, \
  {0x91, 0x3f, 0xcc, 0x8f, 0xe8, 0x17, 0x6f, 0x5f} }

Definition at line 56 of file nsIScriptContextOwner.idl.

Value:
{ /* b3fd8821-b46d-4160-913f-cc8fe8176f5f */ \
  0xb3fd8821, 0xb46d, 0x4160, \
  {0x91, 0x3f, 0xcc, 0x8f, 0xe8, 0x17, 0x6f, 0x5f} }

Typedef Documentation

typedef void(* nsScriptTerminationFunc)(nsISupports *aRef)

Definition at line 53 of file nsIScriptContext.h.


Function Documentation

Definition at line 361 of file nsIScriptContext.h.

{
  if (!(::JS_GetOptions(cx) & JSOPTION_PRIVATE_IS_NSISUPPORTS)) {
    return nsnull;
  }

  nsCOMPtr<nsIScriptContext> scx =
    do_QueryInterface(NS_STATIC_CAST(nsISupports *,
                                     ::JS_GetContextPrivate(cx)));

  // This will return a pointer to something that's about to be
  // released, but that's ok here.
  return scx;
}

Here is the call graph for this function:

Here is the caller graph for this function: