Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
nsWindowSH Class Reference

#include <nsDOMClassInfo.h>

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

List of all members.

Public Member Functions

NS_IMETHOD PreCreate (nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj)
NS_IMETHOD GetProperty (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval id, jsval *vp, PRBool *_retval)
NS_IMETHOD SetProperty (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval id, jsval *vp, PRBool *_retval)
NS_IMETHOD AddProperty (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval id, jsval *vp, PRBool *_retval)
NS_IMETHOD DelProperty (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval id, jsval *vp, PRBool *_retval)
NS_IMETHOD NewResolve (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval id, PRUint32 flags, JSObject **objp, PRBool *_retval)
NS_IMETHOD NewEnumerate (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, PRUint32 enum_op, jsval *statep, jsid *idp, PRBool *_retval)
NS_IMETHOD Finalize (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj)
NS_IMETHOD Equality (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval val, PRBool *bp)
NS_IMETHOD OuterObject (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JSObject **_retval)
NS_IMETHOD InnerObject (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, JSObject **_retval)
NS_IMETHOD Mark (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, void *arg, PRUint32 *_retval)
void preCreate (in nsISupports nativeObj, in JSContextPtr cx, in JSObjectPtr globalObj, out JSObjectPtr parentObj)
void create (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj)
void postCreate (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj)
PRBool addProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSValPtr vp)
PRBool delProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSValPtr vp)
PRBool getProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSValPtr vp)
PRBool setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in JSValPtr vp)
PRBool enumerate (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj)
PRBool newEnumerate (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in PRUint32 enum_op, in JSValPtr statep, out JSID idp)
PRBool newResolve (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 flags, out JSObjectPtr objp)
PRBool convert (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in PRUint32 type, in JSValPtr vp)
void finalize (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj)
PRBool checkAccess (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal id, in PRUint32 mode, in JSValPtr vp)
PRBool call (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in PRUint32 argc, in JSValPtr argv, in JSValPtr vp)
PRBool construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in PRUint32 argc, in JSValPtr argv, in JSValPtr vp)
PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp)
PRUint32 mark (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in voidPtr arg)
PRBool equality (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val)
JSObjectPtr outerObject (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj)
JSObjectPtr innerObject (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj)
void getInterfaces (out PRUint32 count,[array, size_is(count), retval] out nsIIDPtr array)
 Get an ordered list of the interface ids that instances of the class promise to implement.
nsISupports getHelperForLanguage (in PRUint32 language)
 Get a language mapping specific helper object that may assist in using objects of this class in a specific lanaguage.

Static Public Member Functions

static JSBool JS_DLL_CALLBACK GlobalScopePolluterNewResolve (JSContext *cx, JSObject *obj, jsval id, uintN flags, JSObject **objp)
static JSBool JS_DLL_CALLBACK GlobalScopePolluterGetProperty (JSContext *cx, JSObject *obj, jsval id, jsval *vp)
static JSBool JS_DLL_CALLBACK SecurityCheckOnSetProp (JSContext *cx, JSObject *obj, jsval id, jsval *vp)
static void InvalidateGlobalScopePolluter (JSContext *cx, JSObject *obj)
static nsresult InstallGlobalScopePolluter (JSContext *cx, JSObject *obj, nsIHTMLDocument *doc)
static nsIClassInfodoCreate (nsDOMClassInfoData *aData)
NS_DECL_NSIXPCSCRIPTABLE
NS_DECL_ISUPPORTS static
NS_DECL_NSICLASSINFO
nsIClassInfo
GetClassInfoInstance (nsDOMClassInfoID aID)
static nsIClassInfoGetClassInfoInstance (nsDOMClassInfoData *aData)
static void ShutDown ()
static nsresult WrapNative (JSContext *cx, JSObject *scope, nsISupports *native, const nsIID &aIID, jsval *vp, nsIXPConnectJSObjectHolder **aHolder)
static nsresult ThrowJSException (JSContext *cx, nsresult aResult)
static nsresult InitDOMJSClass (JSContext *cx, JSObject *obj)
static const JSClassGetXPCNativeWrapperClass ()
 Get our JSClass pointer for the XPCNativeWrapper class.
static void SetXPCNativeWrapperClass (JSClass *aClass)
 Set our JSClass pointer for the XPCNativeWrapper class.
static PRBool ObjectIsNativeWrapper (JSContext *cx, JSObject *obj)
static nsresult PreserveWrapper (void *aKey, nsIXPConnectJSObjectHolder *(*aKeyToWrapperFunc)(void *aKey), nsIDOMGCParticipant *aParticipant, PRBool aRootWhenExternallyReferenced)
 Note that the XPConnect wrapper should be protected from garbage collection as long as the GC participant is reachable.
static nsresult PreserveNodeWrapper (nsIXPConnectWrappedNative *aWrapper, PRBool aRootWhenExternallyReferenced=PR_FALSE)
 Easier way to call the above just for DOM nodes (and better, since we get the performance benefits of having the same identity function).
static void ReleaseWrapper (void *aKey)
 Undoes the effects of any prior |PreserveWrapper| calls made with |aKey|.
static void MarkReachablePreservedWrappers (nsIDOMGCParticipant *aParticipant, JSContext *cx, void *arg)
 Mark all preserved wrappers reachable from |aDOMNode| via DOM APIs.
static nsresult SetExternallyReferenced (nsIDOMGCParticipant *aParticipant)
 Add/remove |aParticipant| from the table of externally referenced participants.
static void UnsetExternallyReferenced (nsIDOMGCParticipant *aParticipant)
static PRBool BeginGCMark (JSContext *cx)
 Classify the wrappers for use by |MarkReachablePreservedWrappers| during the GC.
static void EndGCMark ()
 Clean up data structures (and strong references) created by |BeginGCMark|.

Public Attributes

const PRUint32 WANT_PRECREATE = 1 << 0
const PRUint32 WANT_CREATE = 1 << 1
const PRUint32 WANT_POSTCREATE = 1 << 2
const PRUint32 WANT_ADDPROPERTY = 1 << 3
const PRUint32 WANT_DELPROPERTY = 1 << 4
const PRUint32 WANT_GETPROPERTY = 1 << 5
const PRUint32 WANT_SETPROPERTY = 1 << 6
const PRUint32 WANT_ENUMERATE = 1 << 7
const PRUint32 WANT_NEWENUMERATE = 1 << 8
const PRUint32 WANT_NEWRESOLVE = 1 << 9
const PRUint32 WANT_CONVERT = 1 << 10
const PRUint32 WANT_FINALIZE = 1 << 11
const PRUint32 WANT_CHECKACCESS = 1 << 12
const PRUint32 WANT_CALL = 1 << 13
const PRUint32 WANT_CONSTRUCT = 1 << 14
const PRUint32 WANT_HASINSTANCE = 1 << 15
const PRUint32 WANT_MARK = 1 << 16
const PRUint32 USE_JSSTUB_FOR_ADDPROPERTY = 1 << 17
const PRUint32 USE_JSSTUB_FOR_DELPROPERTY = 1 << 18
const PRUint32 USE_JSSTUB_FOR_SETPROPERTY = 1 << 19
const PRUint32 DONT_ENUM_STATIC_PROPS = 1 << 20
const PRUint32 DONT_ENUM_QUERY_INTERFACE = 1 << 21
const PRUint32 DONT_ASK_INSTANCE_FOR_SCRIPTABLE = 1 << 22
const PRUint32 CLASSINFO_INTERFACES_ONLY = 1 << 23
const PRUint32 ALLOW_PROP_MODS_DURING_RESOLVE = 1 << 24
const PRUint32 ALLOW_PROP_MODS_TO_PROTOTYPE = 1 << 25
const PRUint32 DONT_SHARE_PROTOTYPE = 1 << 26
const PRUint32 DONT_REFLECT_INTERFACE_NAMES = 1 << 27
const PRUint32 WANT_EQUALITY = 1 << 28
const PRUint32 WANT_OUTER_OBJECT = 1 << 29
const PRUint32 WANT_INNER_OBJECT = 1 << 30
const PRUint32 RESERVED = 1 << 31
const PRUint32 RESERVED = 1 << 31
readonly attribute string className
readonly attribute PRUint32 scriptableFlags
readonly attribute string contractID
 A contract ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|), or null.
readonly attribute string classDescription
 A human readable string naming the class, or null.
readonly attribute nsCIDPtr classID
 A class ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|), or null.
readonly attribute PRUint32 implementationLanguage
 Return language type from list in nsIProgrammingLanguage.
const PRUint32 SINGLETON = 1 << 0
 Bitflags for 'flags' attribute.
const PRUint32 THREADSAFE = 1 << 1
const PRUint32 MAIN_THREAD_ONLY = 1 << 2
const PRUint32 DOM_OBJECT = 1 << 3
const PRUint32 PLUGIN_OBJECT = 1 << 4
const PRUint32 EAGER_CLASSINFO = 1 << 5
const PRUint32 CONTENT_NODE = 1 << 6
 'flags' attribute bitflag: whether objects of this type implement nsIContent.
readonly attribute PRUint32 flags
readonly attribute nsCID classIDNoAlloc
 Also a class ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|).

Static Public Attributes

static JSClass sDOMJSClass
static PRBool sDoSecurityCheckInAddProperty = PR_TRUE

Protected Member Functions

 nsWindowSH (nsDOMClassInfoData *aData)
virtual ~nsWindowSH ()
nsresult RegisterCompileHandler (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval id, PRBool compile, PRBool remove, PRBool *did_define)
nsresult ResolveConstructor (JSContext *cx, JSObject *obj, JSObject **objp)
nsresult doCheckPropertyAccess (JSContext *cx, JSObject *obj, jsval id, nsIXPConnectWrappedNative *wrapper, PRUint32 accessMode, PRBool isWindow)

Static Protected Member Functions

static nsresult GlobalResolve (nsGlobalWindow *aWin, JSContext *cx, JSObject *obj, JSString *str, PRUint32 flags, PRBool *did_resolve)
static PRBool ReallyIsEventName (jsval id, jschar aFirstChar)
static PRBool IsEventName (jsval id)
static JSBool JS_DLL_CALLBACK AddEventListenerHelper (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
static nsresult Init ()
static nsresult RegisterClassName (PRInt32 aDOMClassInfoID)
static nsresult RegisterClassProtos (PRInt32 aDOMClassInfoID)
static nsresult RegisterExternalClasses ()
static PRInt32 GetArrayIndexFromId (JSContext *cx, jsval id, PRBool *aIsNumber=nsnull)
static PRBool IsReadonlyReplaceable (jsval id)
static PRBool IsWritableReplaceable (jsval id)
static nsresult DefineStaticJSVals (JSContext *cx)

Protected Attributes

const nsDOMClassInfoDatamData

Static Protected Attributes

static JSClass sDOMConstructorProtoClass
static JSFunctionSpec sDOMJSClass_methods []
static nsIXPConnectsXPConnect = nsnull
static nsIScriptSecurityManagersSecMan = nsnull
static PRBool sIsInitialized = PR_FALSE
static PRBool sDisableDocumentAllSupport = PR_FALSE
static PRBool sDisableGlobalScopePollutionSupport = PR_FALSE
static jsval sTop_id = JSVAL_VOID
static jsval sParent_id = JSVAL_VOID
static jsval sScrollbars_id = JSVAL_VOID
static jsval sLocation_id = JSVAL_VOID
static jsval sComponents_id = JSVAL_VOID
static jsval sConstructor_id = JSVAL_VOID
static jsval s_content_id = JSVAL_VOID
static jsval sContent_id = JSVAL_VOID
static jsval sMenubar_id = JSVAL_VOID
static jsval sToolbar_id = JSVAL_VOID
static jsval sLocationbar_id = JSVAL_VOID
static jsval sPersonalbar_id = JSVAL_VOID
static jsval sStatusbar_id = JSVAL_VOID
static jsval sDirectories_id = JSVAL_VOID
static jsval sControllers_id = JSVAL_VOID
static jsval sLength_id = JSVAL_VOID
static jsval sInnerHeight_id = JSVAL_VOID
static jsval sInnerWidth_id = JSVAL_VOID
static jsval sOuterHeight_id = JSVAL_VOID
static jsval sOuterWidth_id = JSVAL_VOID
static jsval sScreenX_id = JSVAL_VOID
static jsval sScreenY_id = JSVAL_VOID
static jsval sStatus_id = JSVAL_VOID
static jsval sName_id = JSVAL_VOID
static jsval sOnmousedown_id = JSVAL_VOID
static jsval sOnmouseup_id = JSVAL_VOID
static jsval sOnclick_id = JSVAL_VOID
static jsval sOndblclick_id = JSVAL_VOID
static jsval sOncontextmenu_id = JSVAL_VOID
static jsval sOnmouseover_id = JSVAL_VOID
static jsval sOnmouseout_id = JSVAL_VOID
static jsval sOnkeydown_id = JSVAL_VOID
static jsval sOnkeyup_id = JSVAL_VOID
static jsval sOnkeypress_id = JSVAL_VOID
static jsval sOnmousemove_id = JSVAL_VOID
static jsval sOnfocus_id = JSVAL_VOID
static jsval sOnblur_id = JSVAL_VOID
static jsval sOnsubmit_id = JSVAL_VOID
static jsval sOnreset_id = JSVAL_VOID
static jsval sOnchange_id = JSVAL_VOID
static jsval sOnselect_id = JSVAL_VOID
static jsval sOnload_id = JSVAL_VOID
static jsval sOnbeforeunload_id = JSVAL_VOID
static jsval sOnunload_id = JSVAL_VOID
static jsval sOnpageshow_id = JSVAL_VOID
static jsval sOnpagehide_id = JSVAL_VOID
static jsval sOnabort_id = JSVAL_VOID
static jsval sOnerror_id = JSVAL_VOID
static jsval sOnpaint_id = JSVAL_VOID
static jsval sOnresize_id = JSVAL_VOID
static jsval sOnscroll_id = JSVAL_VOID
static jsval sScrollIntoView_id = JSVAL_VOID
static jsval sScrollX_id = JSVAL_VOID
static jsval sScrollY_id = JSVAL_VOID
static jsval sScrollMaxX_id = JSVAL_VOID
static jsval sScrollMaxY_id = JSVAL_VOID
static jsval sOpen_id = JSVAL_VOID
static jsval sItem_id = JSVAL_VOID
static jsval sNamedItem_id = JSVAL_VOID
static jsval sEnumerate_id = JSVAL_VOID
static jsval sNavigator_id = JSVAL_VOID
static jsval sDocument_id = JSVAL_VOID
static jsval sWindow_id = JSVAL_VOID
static jsval sFrames_id = JSVAL_VOID
static jsval sSelf_id = JSVAL_VOID
static jsval sOpener_id = JSVAL_VOID
static jsval sAdd_id = JSVAL_VOID
static jsval sAll_id = JSVAL_VOID
static jsval sTags_id = JSVAL_VOID
static jsval sAddEventListener_id = JSVAL_VOID
static const JSClasssObjectClass = nsnull
static const JSClasssXPCNativeWrapperClass = nsnull

Detailed Description

Definition at line 486 of file nsDOMClassInfo.h.


Constructor & Destructor Documentation

nsWindowSH::nsWindowSH ( nsDOMClassInfoData aData) [inline, protected]

Definition at line 489 of file nsDOMClassInfo.h.

                                        : nsEventReceiverSH(aData)
  {
  }

Here is the caller graph for this function:

virtual nsWindowSH::~nsWindowSH ( ) [inline, protected, virtual]

Definition at line 493 of file nsDOMClassInfo.h.

  {
  }

Member Function Documentation

JSBool JS_DLL_CALLBACK nsEventReceiverSH::AddEventListenerHelper ( JSContext cx,
JSObject obj,
uintN  argc,
jsval argv,
jsval rval 
) [static, protected, inherited]

Definition at line 6754 of file nsDOMClassInfo.cpp.

{
  if (argc < 3 || argc > 4) {
    ThrowJSException(cx, NS_ERROR_XPC_NOT_ENOUGH_ARGS);

    return JS_FALSE;
  }

  // Can't use the macro OBJ_TO_INNER_OBJECT here due to it using the
  // non-exported function js_GetSlotThreadSafe().
  {
    JSClass *clasp = JS_GET_CLASS(cx, obj);
    if (clasp->flags & JSCLASS_IS_EXTENDED) {
      JSExtendedClass *xclasp = (JSExtendedClass*)clasp;
      if (xclasp->innerObject)
        obj = xclasp->innerObject(cx, obj);
    }
  }

  nsCOMPtr<nsIXPConnectWrappedNative> wrapper;
  nsresult rv =
    sXPConnect->GetWrappedNativeOfJSObject(cx, obj, getter_AddRefs(wrapper));
  if (NS_FAILED(rv)) {
    nsDOMClassInfo::ThrowJSException(cx, rv);

    return JS_FALSE;
  }

  // Set obj to be the object on which we'll actually register the
  // event listener.
  wrapper->GetJSObject(&obj);

  // Check that the caller has permission to call obj's addEventListener.
  if (NS_FAILED(sSecMan->CheckPropertyAccess(cx, obj,
                                             JS_GET_CLASS(cx, obj)->name,
                                             sAddEventListener_id,
                                             nsIXPCSecurityManager::ACCESS_GET_PROPERTY)) ||
      NS_FAILED(sSecMan->CheckPropertyAccess(cx, obj,
                                             JS_GET_CLASS(cx, obj)->name,
                                             sAddEventListener_id,
                                             nsIXPCSecurityManager::ACCESS_CALL_METHOD))) {
    // The caller doesn't have access to get or call the callee
    // object's addEventListener method. The security manager already
    // threw an exception for us, so simply return false.

    return JS_FALSE;
  }

  if (JSVAL_IS_PRIMITIVE(argv[1])) {
    // The second argument must be a function, or a
    // nsIDOMEventListener. Throw an error.
    ThrowJSException(cx, NS_ERROR_XPC_BAD_CONVERT_JS);

    return JS_FALSE;
  }

  JSString* jsstr = JS_ValueToString(cx, argv[0]);
  if (!jsstr) {
    nsDOMClassInfo::ThrowJSException(cx, NS_ERROR_OUT_OF_MEMORY);

    return JS_FALSE;
  }

  nsDependentJSString type(jsstr);

  nsCOMPtr<nsIDOMEventListener> listener;

  {
    nsCOMPtr<nsISupports> tmp;
    sXPConnect->WrapJS(cx, JSVAL_TO_OBJECT(argv[1]),
                       NS_GET_IID(nsIDOMEventListener), getter_AddRefs(tmp));

    listener = do_QueryInterface(tmp, &rv);
    if (NS_FAILED(rv)) {
      ThrowJSException(cx, rv);

      return JS_FALSE;
    }
  }

  JSBool useCapture;
  if (!JS_ValueToBoolean(cx, argv[2], &useCapture)) {
    return JS_FALSE;
  }

  if (argc == 4) {
    JSBool wantsUntrusted;
    if (!JS_ValueToBoolean(cx, argv[3], &wantsUntrusted)) {
      return JS_FALSE;
    }

    nsCOMPtr<nsIDOMNSEventTarget> eventTarget(do_QueryWrappedNative(wrapper,
                                                                    &rv));
    if (NS_FAILED(rv)) {
      ThrowJSException(cx, rv);

      return JS_FALSE;
    }

    rv = eventTarget->AddEventListener(type, listener, useCapture,
                                       wantsUntrusted);
    if (NS_FAILED(rv)) {
      ThrowJSException(cx, rv);

      return JS_FALSE;
    }
  } else {
    nsCOMPtr<nsIDOMEventTarget> eventTarget(do_QueryWrappedNative(wrapper,
                                                                  &rv));
    if (NS_FAILED(rv)) {
      ThrowJSException(cx, rv);

      return JS_FALSE;
    }

    rv = eventTarget->AddEventListener(type, listener, useCapture);
    if (NS_FAILED(rv)) {
      ThrowJSException(cx, rv);

      return JS_FALSE;
    }
  }
  
  return JS_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsWindowSH::AddProperty ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
jsval vp,
PRBool _retval 
)

Reimplemented from nsEventReceiverSH.

Definition at line 4318 of file nsDOMClassInfo.cpp.

{
  nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);

#ifdef DEBUG_SH_FORWARDING
  {
    nsDependentJSString str(::JS_ValueToString(cx, id));

    if (win->IsInnerWindow()) {
#ifdef DEBUG_PRINT_INNER
      printf("Property '%s' add on inner window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
#endif
    } else {
      printf("Property '%s' add on outer window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
    }
  }
#endif

  if (win->IsOuterWindow() && !ObjectIsNativeWrapper(cx, obj) ) {
    // XXXjst: Do security checks here when we remove the security
    // checks on the inner window.

    nsGlobalWindow *innerWin = win->GetCurrentInnerWindowInternal();

    JSObject *innerObj;
    if (innerWin && (innerObj = innerWin->GetGlobalJSObject())) {
#ifdef DEBUG_SH_FORWARDING
      printf(" --- Forwarding add to inner window %p\n", (void *)innerWin);
#endif

      // Forward the add to the inner object
      jsid interned_id;
      *_retval = (::JS_ValueToId(cx, id, &interned_id) &&
                  OBJ_DEFINE_PROPERTY(cx, innerObj, interned_id, *vp, nsnull,
                                      nsnull, JSPROP_ENUMERATE, nsnull));

      return NS_OK;
    }
  }

  // If we're in a state where we're not supposed to do a security
  // check, return early.
  if (!sDoSecurityCheckInAddProperty) {
    return NS_OK;
  }

  if (id == sLocation_id) {
    // Don't allow adding a window.location setter or getter, allowing
    // that could lead to security bugs (see bug 143369).

    return NS_ERROR_DOM_SECURITY_ERR;
  }

  nsresult rv =
    doCheckPropertyAccess(cx, obj, id, wrapper,
                          nsIXPCSecurityManager::ACCESS_SET_PROPERTY,
                          PR_TRUE);

  if (NS_FAILED(rv)) {
    // Security check failed. The security manager set a JS
    // exception, we must make sure that exception is propagated.

    *_retval = PR_FALSE;

    return NS_OK;
  }

  return nsEventReceiverSH::AddProperty(wrapper, cx, obj, id, vp, _retval);
}

Here is the call graph for this function:

PRBool nsDOMClassInfo::BeginGCMark ( JSContext cx) [static, inherited]

Classify the wrappers for use by |MarkReachablePreservedWrappers| during the GC.

Returns false to indicate failure (out-of-memory).

Definition at line 5350 of file nsDOMClassInfo.cpp.

{
  NS_PRECONDITION(!sWrapperSCCTable.ops, "table already initialized");

#ifdef DEBUG_PRESERVE_WRAPPERS
  printf("Classifying preserved wrappers into SCCs:\n");
#endif

  if (!PL_DHashTableInit(&sWrapperSCCTable, &sWrapperSCCTableOps, nsnull,
                         sizeof(WrapperSCCEntry), 16)) {
    return PR_FALSE;
  }

  PRBool failure = PR_FALSE;
  if (sPreservedWrapperTable.ops) {
    PL_DHashTableEnumerate(&sPreservedWrapperTable, ClassifyWrapper, &failure);
  }
  if (failure) {
    PL_DHashTableFinish(&sWrapperSCCTable);
    // caller will reset table ops
    return PR_FALSE;
  }

#ifdef DEBUG_PRESERVE_WRAPPERS
  printf("Marking:\n");
#endif

  if (sExternallyReferencedTable.ops) {
    PL_DHashTableEnumerate(&sExternallyReferencedTable,
                           MarkExternallyReferenced, cx);
  }

  return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsIXPCScriptable::call ( in nsIXPConnectWrappedNative  wrapper,
in JSContextPtr  cx,
in JSObjectPtr  obj,
in PRUint32  argc,
in JSValPtr  argv,
in JSValPtr  vp 
) [inherited]
PRBool nsIXPCScriptable::construct ( in nsIXPConnectWrappedNative  wrapper,
in JSContextPtr  cx,
in JSObjectPtr  obj,
in PRUint32  argc,
in JSValPtr  argv,
in JSValPtr  vp 
) [inherited]
nsresult nsDOMClassInfo::DefineStaticJSVals ( JSContext cx) [static, protected, inherited]

Definition at line 1313 of file nsDOMClassInfo.cpp.

{
#define SET_JSVAL_TO_STRING(_val, _cx, _str)                                  \
  _val = GetInternedJSVal(_cx, _str);                                         \
  if (!JSVAL_IS_STRING(_val)) {                                               \
    return NS_ERROR_OUT_OF_MEMORY;                                            \
  }

  SET_JSVAL_TO_STRING(sTop_id,             cx, "top");
  SET_JSVAL_TO_STRING(sParent_id,          cx, "parent");
  SET_JSVAL_TO_STRING(sScrollbars_id,      cx, "scrollbars");
  SET_JSVAL_TO_STRING(sLocation_id,        cx, "location");
  SET_JSVAL_TO_STRING(sComponents_id,      cx, "Components");
  SET_JSVAL_TO_STRING(sConstructor_id,     cx, "constructor");
  SET_JSVAL_TO_STRING(s_content_id,        cx, "_content");
  SET_JSVAL_TO_STRING(sContent_id,         cx, "content");
  SET_JSVAL_TO_STRING(sMenubar_id,         cx, "menubar");
  SET_JSVAL_TO_STRING(sToolbar_id,         cx, "toolbar");
  SET_JSVAL_TO_STRING(sLocationbar_id,     cx, "locationbar");
  SET_JSVAL_TO_STRING(sPersonalbar_id,     cx, "personalbar");
  SET_JSVAL_TO_STRING(sStatusbar_id,       cx, "statusbar");
  SET_JSVAL_TO_STRING(sDirectories_id,     cx, "directories");
  SET_JSVAL_TO_STRING(sControllers_id,     cx, "controllers");
  SET_JSVAL_TO_STRING(sLength_id,          cx, "length");
  SET_JSVAL_TO_STRING(sInnerHeight_id,     cx, "innerHeight");
  SET_JSVAL_TO_STRING(sInnerWidth_id,      cx, "innerWidth");
  SET_JSVAL_TO_STRING(sOuterHeight_id,     cx, "outerHeight");
  SET_JSVAL_TO_STRING(sOuterWidth_id,      cx, "outerWidth");
  SET_JSVAL_TO_STRING(sScreenX_id,         cx, "screenX");
  SET_JSVAL_TO_STRING(sScreenY_id,         cx, "screenY");
  SET_JSVAL_TO_STRING(sStatus_id,          cx, "status");
  SET_JSVAL_TO_STRING(sName_id,            cx, "name");
  SET_JSVAL_TO_STRING(sOnmousedown_id,     cx, "onmousedown");
  SET_JSVAL_TO_STRING(sOnmouseup_id,       cx, "onmouseup");
  SET_JSVAL_TO_STRING(sOnclick_id,         cx, "onclick");
  SET_JSVAL_TO_STRING(sOndblclick_id,      cx, "ondblclick");
  SET_JSVAL_TO_STRING(sOncontextmenu_id,   cx, "oncontextmenu");
  SET_JSVAL_TO_STRING(sOnmouseover_id,     cx, "onmouseover");
  SET_JSVAL_TO_STRING(sOnmouseout_id,      cx, "onmouseout");
  SET_JSVAL_TO_STRING(sOnkeydown_id,       cx, "onkeydown");
  SET_JSVAL_TO_STRING(sOnkeyup_id,         cx, "onkeyup");
  SET_JSVAL_TO_STRING(sOnkeypress_id,      cx, "onkeypress");
  SET_JSVAL_TO_STRING(sOnmousemove_id,     cx, "onmousemove");
  SET_JSVAL_TO_STRING(sOnfocus_id,         cx, "onfocus");
  SET_JSVAL_TO_STRING(sOnblur_id,          cx, "onblur");
  SET_JSVAL_TO_STRING(sOnsubmit_id,        cx, "onsubmit");
  SET_JSVAL_TO_STRING(sOnreset_id,         cx, "onreset");
  SET_JSVAL_TO_STRING(sOnchange_id,        cx, "onchange");
  SET_JSVAL_TO_STRING(sOnselect_id,        cx, "onselect");
  SET_JSVAL_TO_STRING(sOnload_id,          cx, "onload");
  SET_JSVAL_TO_STRING(sOnbeforeunload_id,  cx, "onbeforeunload");
  SET_JSVAL_TO_STRING(sOnunload_id,        cx, "onunload");
  SET_JSVAL_TO_STRING(sOnpageshow_id,      cx, "onpageshow");
  SET_JSVAL_TO_STRING(sOnpagehide_id,      cx, "onpagehide");
  SET_JSVAL_TO_STRING(sOnabort_id,         cx, "onabort");
  SET_JSVAL_TO_STRING(sOnerror_id,         cx, "onerror");
  SET_JSVAL_TO_STRING(sOnpaint_id,         cx, "onpaint");
  SET_JSVAL_TO_STRING(sOnresize_id,        cx, "onresize");
  SET_JSVAL_TO_STRING(sOnscroll_id,        cx, "onscroll");
  SET_JSVAL_TO_STRING(sScrollIntoView_id,  cx, "scrollIntoView");
  SET_JSVAL_TO_STRING(sScrollX_id,         cx, "scrollX");
  SET_JSVAL_TO_STRING(sScrollY_id,         cx, "scrollY");
  SET_JSVAL_TO_STRING(sScrollMaxX_id,      cx, "scrollMaxX");
  SET_JSVAL_TO_STRING(sScrollMaxY_id,      cx, "scrollMaxY");
  SET_JSVAL_TO_STRING(sOpen_id,            cx, "open");
  SET_JSVAL_TO_STRING(sItem_id,            cx, "item");
  SET_JSVAL_TO_STRING(sNamedItem_id,       cx, "namedItem");
  SET_JSVAL_TO_STRING(sEnumerate_id,       cx, "enumerateProperties");
  SET_JSVAL_TO_STRING(sNavigator_id,       cx, "navigator");
  SET_JSVAL_TO_STRING(sDocument_id,        cx, "document");
  SET_JSVAL_TO_STRING(sWindow_id,          cx, "window");
  SET_JSVAL_TO_STRING(sFrames_id,          cx, "frames");
  SET_JSVAL_TO_STRING(sSelf_id,            cx, "self");
  SET_JSVAL_TO_STRING(sOpener_id,          cx, "opener");
  SET_JSVAL_TO_STRING(sAdd_id,             cx, "add");
  SET_JSVAL_TO_STRING(sAll_id,             cx, "all");
  SET_JSVAL_TO_STRING(sTags_id,            cx, "tags");
  SET_JSVAL_TO_STRING(sAddEventListener_id,cx, "addEventListener");

  return NS_OK;
}

Here is the caller graph for this function:

NS_IMETHODIMP nsWindowSH::DelProperty ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
jsval vp,
PRBool _retval 
)

Definition at line 4393 of file nsDOMClassInfo.cpp.

{
  nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);

#ifdef DEBUG_SH_FORWARDING
  {
    nsDependentJSString str(::JS_ValueToString(cx, id));

    if (win->IsInnerWindow()) {
#ifdef DEBUG_PRINT_INNER
      printf("Property '%s' del on inner window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
#endif
    } else {
      printf("Property '%s' del on outer window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
    }
  }
#endif

  if (win->IsOuterWindow() && !ObjectIsNativeWrapper(cx, obj)) {
    // XXXjst: Do security checks here when we remove the security
    // checks on the inner window.

    nsGlobalWindow *innerWin = win->GetCurrentInnerWindowInternal();

    JSObject *innerObj;
    if (innerWin && (innerObj = innerWin->GetGlobalJSObject())) {
#ifdef DEBUG_SH_FORWARDING
      printf(" --- Forwarding del to inner window %p\n", (void *)innerWin);
#endif

      // Forward the del to the inner object
      jsid interned_id;
      *_retval = (::JS_ValueToId(cx, id, &interned_id) &&
                  OBJ_DELETE_PROPERTY(cx, innerObj, interned_id, vp));

      return NS_OK;
    }
  }

  if (id == sLocation_id) {
    // Don't allow deleting window.location, allowing that could lead
    // to security bugs (see bug 143369).

    return NS_ERROR_DOM_SECURITY_ERR;
  }

  nsresult rv =
    doCheckPropertyAccess(cx, obj, id, wrapper,
                          nsIXPCSecurityManager::ACCESS_SET_PROPERTY,
                          PR_TRUE);

  if (NS_FAILED(rv)) {
    // Security check failed. The security manager set a JS
    // exception, we must make sure that exception is propagated.

    *_retval = PR_FALSE;
  }

  return NS_OK;
}

Here is the call graph for this function:

nsresult nsDOMClassInfo::doCheckPropertyAccess ( JSContext cx,
JSObject obj,
jsval  id,
nsIXPConnectWrappedNative wrapper,
PRUint32  accessMode,
PRBool  isWindow 
) [protected, inherited]

Definition at line 3769 of file nsDOMClassInfo.cpp.

{
  if (!sSecMan) {
    return NS_OK;
  }

  // Don't check when getting the Components property, since we check
  // its properties anyway. This will help performance.
  if (id == sComponents_id &&
      accessMode == nsIXPCSecurityManager::ACCESS_GET_PROPERTY && isWindow) {
    return NS_OK;
  }

  nsISupports *native = wrapper->Native();
  nsCOMPtr<nsIScriptGlobalObject> sgo;

  if (isWindow) {
    sgo = do_QueryInterface(native);
    NS_ENSURE_TRUE(sgo, NS_ERROR_UNEXPECTED);
  } else {
    nsCOMPtr<nsIDocument> doc(do_QueryInterface(native));
    NS_ENSURE_TRUE(doc, NS_ERROR_UNEXPECTED);

    sgo = doc->GetScriptGlobalObject();

    if (!sgo) {
      // There's no script global in the document. This means that
      // this document is a result from using XMLHttpRequest or it's a
      // document created through a DOMImplementation. In that case
      // there's nothing we can do since the context on which the
      // document was created is not accessable and we can't do a
      // security check, but the document must remain
      // scriptable. Documents loaded through these methods have
      // already been vetted by the security manager before they were
      // loaded, so allowing access here w/o doing a security check
      // here is probably safe anyway.

      return NS_OK;
    }
  }

  nsIScriptContext *scx = sgo->GetContext();
  JSObject *global;

  if (!scx || !scx->IsContextInitialized() ||
      !(global = sgo->GetGlobalJSObject())) {
    return NS_OK;
  }

  return sSecMan->CheckPropertyAccess(cx, global, mData->mName, id,
                                      accessMode);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static nsIClassInfo* nsWindowSH::doCreate ( nsDOMClassInfoData aData) [inline, static]

Reimplemented from nsDOMGCParticipantSH.

Definition at line 543 of file nsDOMClassInfo.h.

  {
    return new nsWindowSH(aData);
  }

Here is the call graph for this function:

void nsDOMClassInfo::EndGCMark ( ) [static, inherited]

Clean up data structures (and strong references) created by |BeginGCMark|.

Definition at line 5387 of file nsDOMClassInfo.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsWindowSH::Equality ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  val,
PRBool bp 
)

Definition at line 6387 of file nsDOMClassInfo.cpp.

{
  *bp = PR_FALSE;

  if (JSVAL_IS_PRIMITIVE(val)) {
    return NS_OK;
  }

  nsCOMPtr<nsIXPConnectWrappedNative> other_wrapper;
  nsContentUtils::XPConnect()->
    GetWrappedNativeOfJSObject(cx, JSVAL_TO_OBJECT(val),
                               getter_AddRefs(other_wrapper));
  if (!other_wrapper) {
    // Not equal.

    return NS_OK;
  }

  nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);

  NS_ASSERTION(win->IsOuterWindow(),
               "Inner window detected in Equality hook!");

  nsCOMPtr<nsPIDOMWindow> other = do_QueryWrappedNative(other_wrapper);

  if (other) {
    NS_ASSERTION(other->IsOuterWindow(),
                 "Inner window detected in Equality hook!");

    *bp = win->GetOuterWindow() == other->GetOuterWindow();
  }

  return NS_OK;
}

Here is the call graph for this function:

Reimplemented from nsDOMGCParticipantSH.

Definition at line 6375 of file nsDOMClassInfo.cpp.

{
  nsCOMPtr<nsIScriptGlobalObject> sgo(do_QueryWrappedNative(wrapper));
  NS_ENSURE_TRUE(sgo, NS_ERROR_UNEXPECTED);

  sgo->OnFinalize(obj);

  return nsEventReceiverSH::Finalize(wrapper, cx, obj);
}

Here is the call graph for this function:

PRInt32 nsDOMClassInfo::GetArrayIndexFromId ( JSContext cx,
jsval  id,
PRBool aIsNumber = nsnull 
) [static, protected, inherited]

Definition at line 3028 of file nsDOMClassInfo.cpp.

{
  jsdouble array_index;

  if (aIsNumber) {
    *aIsNumber = PR_FALSE;
  }

  if (!::JS_ValueToNumber(cx, id, &array_index)) {
    return -1;
  }

  jsint i = -1;

  if (!JSDOUBLE_IS_INT(array_index, i)) {
    return -1;
  }

  if (aIsNumber) {
    *aIsNumber = PR_TRUE;
  }

  return i;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 3525 of file nsDOMClassInfo.cpp.

{
  if (aID >= eDOMClassInfoIDCount) {
    NS_ERROR("Bad ID!");

    return nsnull;
  }

  if (!sIsInitialized) {
    nsresult rv = Init();

    NS_ENSURE_SUCCESS(rv, nsnull);
  }

  if (!sClassInfoData[aID].mCachedClassInfo) {
    nsDOMClassInfoData& data = sClassInfoData[aID];

    data.mCachedClassInfo = data.u.mConstructorFptr(&data);
    NS_ENSURE_TRUE(data.mCachedClassInfo, nsnull);

    NS_ADDREF(data.mCachedClassInfo);
  }

  NS_ASSERTION(!IS_EXTERNAL(sClassInfoData[aID].mCachedClassInfo),
               "This is bad, internal class marked as external!");

  return sClassInfoData[aID].mCachedClassInfo;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 3556 of file nsDOMClassInfo.cpp.

{
  NS_ASSERTION(IS_EXTERNAL(aData->mCachedClassInfo)
               || !aData->mCachedClassInfo,
               "This is bad, external class marked as internal!");

  if (!aData->mCachedClassInfo) {
    if (aData->u.mExternalConstructorFptr) {
      aData->mCachedClassInfo =
        aData->u.mExternalConstructorFptr(aData->mName);
    } else {
      aData->mCachedClassInfo = nsDOMGenericSH::doCreate(aData);
    }
    NS_ENSURE_TRUE(aData->mCachedClassInfo, nsnull);

    NS_ADDREF(aData->mCachedClassInfo);
    aData->mCachedClassInfo = MARK_EXTERNAL(aData->mCachedClassInfo);
  }

  return GET_CLEAN_CI_PTR(aData->mCachedClassInfo);
}

Here is the call graph for this function:

nsISupports nsIClassInfo::getHelperForLanguage ( in PRUint32  language) [inherited]

Get a language mapping specific helper object that may assist in using objects of this class in a specific lanaguage.

For instance, if asked for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return an object that can be QI'd into the nsIXPCScriptable interface to assist XPConnect in supplying JavaScript specific behavior to callers of the instance object.

see: nsIProgrammingLanguage.idl

Should return null if no helper available for given language.

void nsIClassInfo::getInterfaces ( out PRUint32  count,
[array, size_is(count), retval] out nsIIDPtr  array 
) [inherited]

Get an ordered list of the interface ids that instances of the class promise to implement.

Note that nsISupports is an implicit member of any such list and need not be included.

Should set *count = 0 and *array = null and return NS_OK if getting the list is not supported.

NS_IMETHODIMP nsWindowSH::GetProperty ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
jsval vp,
PRBool _retval 
)

Definition at line 4099 of file nsDOMClassInfo.cpp.

{
  nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);

#ifdef DEBUG_SH_FORWARDING
  {
    nsDependentJSString str(::JS_ValueToString(cx, id));

    if (win->IsInnerWindow()) {
#ifdef DEBUG_PRINT_INNER
      printf("Property '%s' get on inner window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
#endif
    } else {
      printf("Property '%s' get on outer window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
    }
  }
#endif

  if (win->IsOuterWindow() && !ObjectIsNativeWrapper(cx, obj)) {
    // XXXjst: Do security checks here when we remove the security
    // checks on the inner window.

    nsGlobalWindow *innerWin = win->GetCurrentInnerWindowInternal();

    JSObject *innerObj;
    if (innerWin && (innerObj = innerWin->GetGlobalJSObject())) {
#ifdef DEBUG_SH_FORWARDING
      printf(" --- Forwarding get to inner window %p\n", (void *)innerWin);
#endif

      // Forward the get to the inner object
      if (JSVAL_IS_STRING(id)) {
        JSString *str = JSVAL_TO_STRING(id);

        *_retval = ::JS_GetUCProperty(cx, innerObj, ::JS_GetStringChars(str),
                                      ::JS_GetStringLength(str), vp);
      } else if (JSVAL_IS_INT(id)) {
        *_retval = ::JS_GetElement(cx, innerObj, JSVAL_TO_INT(id), vp);
      } else {
        NS_ERROR("Write me!");

        return NS_ERROR_NOT_IMPLEMENTED;
      }

      return NS_OK;
    }
  }

  // The order in which things are done in this method are a bit
  // whacky, that's because this method is *extremely* performace
  // critical. Don't touch this unless you know what you're doing.

  if (JSVAL_IS_INT(id)) {
    // If we're accessing a numeric property we'll treat that as if
    // window.frames[n] is accessed (since window.frames === window),
    // if window.frames[n] is a child frame, wrap the frame and return
    // it without doing a security check.

    nsCOMPtr<nsIDOMWindow> frame = GetChildFrame(win, id);
    nsresult rv = NS_OK;

    if (frame) {
      // A numeric property accessed and the numeric property is a
      // child frame, wrap the child frame without doing a security
      // check and return.

      nsGlobalWindow *frameWin = (nsGlobalWindow *)frame.get();

      nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
      rv = WrapNative(cx, frameWin->GetGlobalJSObject(), frame,
                      NS_GET_IID(nsIDOMWindow), vp,
                      getter_AddRefs(holder));
    }

    return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING;
  }

  if (needsSecurityCheck(cx, wrapper)) {
    // Even if we'd need to do a security check for access to "normal"
    // properties on a window, we won't do a security check if we're
    // accessing a child frame.

    if (JSVAL_IS_STRING(id) && !JSVAL_IS_PRIMITIVE(*vp) &&
        ::JS_TypeOfValue(cx, *vp) != JSTYPE_FUNCTION) {
      // A named property accessed which could have been resolved to a
      // child frame in nsWindowSH::NewResolve() (*vp will tell us if
      // that's the case). If *vp is a window object (i.e. a child
      // frame), return without doing a security check.

      nsCOMPtr<nsIXPConnectWrappedNative> vpwrapper;
      sXPConnect->GetWrappedNativeOfJSObject(cx, JSVAL_TO_OBJECT(*vp),
                                             getter_AddRefs(vpwrapper));

      if (vpwrapper) {
        nsCOMPtr<nsIDOMWindow> window(do_QueryWrappedNative(vpwrapper));

        if (window) {
          // Yup, *vp is a window object, return early (*vp is already
          // the window, so no need to wrap it again).

          return NS_SUCCESS_I_DID_SOMETHING;
        }
      }
    }

    nsresult rv =
      doCheckPropertyAccess(cx, obj, id, wrapper,
                            nsIXPCSecurityManager::ACCESS_GET_PROPERTY,
                            PR_TRUE);

    if (NS_FAILED(rv)) {
      // Security check failed. The security manager set a JS
      // exception, we must make sure that exception is propagated.

      *_retval = PR_FALSE;

      *vp = JSVAL_NULL;
    }
  }

  return NS_OK;
}

Here is the call graph for this function:

static const JSClass* nsDOMClassInfo::GetXPCNativeWrapperClass ( ) [inline, static, inherited]

Get our JSClass pointer for the XPCNativeWrapper class.

Definition at line 148 of file nsDOMClassInfo.h.

Here is the caller graph for this function:

nsresult nsWindowSH::GlobalResolve ( nsGlobalWindow aWin,
JSContext cx,
JSObject obj,
JSString str,
PRUint32  flags,
PRBool did_resolve 
) [static, protected]

Definition at line 5405 of file nsDOMClassInfo.cpp.

{
  *did_resolve = PR_FALSE;

  extern nsScriptNameSpaceManager *gNameSpaceManager;

  NS_ENSURE_TRUE(gNameSpaceManager, NS_ERROR_NOT_INITIALIZED);

  nsDependentJSString name(str);

  const nsGlobalNameStruct *name_struct = nsnull;
  const PRUnichar *class_name = nsnull;

  gNameSpaceManager->LookupName(name, &name_struct, &class_name);

  if (!name_struct) {
    return NS_OK;
  }

  NS_ENSURE_TRUE(class_name, NS_ERROR_UNEXPECTED);

  nsresult rv = NS_OK;

  if (name_struct->mType == nsGlobalNameStruct::eTypeExternalClassInfoCreator) {
    nsCOMPtr<nsIDOMCIExtension> creator(do_CreateInstance(name_struct->mCID, &rv));
    NS_ENSURE_SUCCESS(rv, rv);

    nsCOMPtr<nsIDOMScriptObjectFactory> sof(do_GetService(kDOMSOF_CID));
    NS_ENSURE_TRUE(sof, NS_ERROR_FAILURE);

    rv = creator->RegisterDOMCI(NS_ConvertUCS2toUTF8(name).get(), sof);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = gNameSpaceManager->LookupName(name, &name_struct);
    if (NS_FAILED(rv) || !name_struct ||
        name_struct->mType != nsGlobalNameStruct::eTypeExternalClassInfo) {
      NS_ERROR("Couldn't get the DOM ClassInfo data.");

      return NS_OK;
    }
  }

  if (name_struct->mType == nsGlobalNameStruct::eTypeInterface) {
    // We're resolving a name of a DOM interface for which there is no
    // direct DOM class, create a constructor object...

    nsRefPtr<nsDOMConstructor> constructor;
    rv = nsDOMConstructor::Create(NS_REINTERPRET_CAST(PRUnichar *,
                                    ::JS_GetStringChars(str)),
                                  NS_STATIC_CAST(nsPIDOMWindow*, aWin),
                                  getter_AddRefs(constructor));
    NS_ENSURE_SUCCESS(rv, rv);

    PRBool doSecurityCheckInAddProperty = sDoSecurityCheckInAddProperty;
    sDoSecurityCheckInAddProperty = PR_FALSE;

    nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
    jsval v;

    rv = WrapNative(cx, obj, constructor, NS_GET_IID(nsIDOMConstructor), &v,
                    getter_AddRefs(holder));

    sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;

    NS_ENSURE_SUCCESS(rv, rv);

    rv = constructor->Install(cx, obj, v);
    NS_ENSURE_SUCCESS(rv, rv);

    JSObject *class_obj;
    holder->GetJSObject(&class_obj);
    NS_ASSERTION(class_obj, "The return value lied");

    // ... and define the constants from the DOM interface on that
    // constructor object.

    rv = DefineInterfaceConstants(cx, class_obj, &name_struct->mIID);
    NS_ENSURE_SUCCESS(rv, rv);

    *did_resolve = PR_TRUE;

    return NS_OK;
  }

  if (name_struct->mType == nsGlobalNameStruct::eTypeClassConstructor ||
      name_struct->mType == nsGlobalNameStruct::eTypeExternalClassInfo ||
      name_struct->mType == nsGlobalNameStruct::eTypeClassProto ||
      name_struct->mType == nsGlobalNameStruct::eTypeExternalConstructorAlias) {
    const nsDOMClassInfoData *ci_data = nsnull;
    const nsGlobalNameStruct* alias_struct = nsnull;

    if (name_struct->mType == nsGlobalNameStruct::eTypeClassConstructor &&
        name_struct->mDOMClassInfoID >= 0) {
      ci_data = &sClassInfoData[name_struct->mDOMClassInfoID];
    } else if (name_struct->mType == nsGlobalNameStruct::eTypeExternalClassInfo) {
      ci_data = name_struct->mData;
    } else if (name_struct->mType == nsGlobalNameStruct::eTypeExternalConstructorAlias) {
      alias_struct = gNameSpaceManager->GetConstructorProto(name_struct);
      NS_ENSURE_TRUE(alias_struct, NS_ERROR_UNEXPECTED);

      if (alias_struct->mType == nsGlobalNameStruct::eTypeClassConstructor) {
        ci_data = &sClassInfoData[alias_struct->mDOMClassInfoID];
      } else if (alias_struct->mType == nsGlobalNameStruct::eTypeExternalClassInfo) {
        ci_data = alias_struct->mData;
      }
    }

    const PRUnichar *name = NS_REINTERPRET_CAST(PRUnichar *,
                                                ::JS_GetStringChars(str));
    nsRefPtr<nsDOMConstructor> constructor;
    rv = nsDOMConstructor::Create(name,
                                  NS_STATIC_CAST(nsPIDOMWindow*, aWin),
                                  getter_AddRefs(constructor));
    NS_ENSURE_SUCCESS(rv, rv);

    PRBool doSecurityCheckInAddProperty = sDoSecurityCheckInAddProperty;
    sDoSecurityCheckInAddProperty = PR_FALSE;

    nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
    jsval v;

    rv = WrapNative(cx, obj, constructor, NS_GET_IID(nsIDOMConstructor), &v,
                    getter_AddRefs(holder));

    sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;

    NS_ENSURE_SUCCESS(rv, rv);

    rv = constructor->Install(cx, obj, v);
    NS_ENSURE_SUCCESS(rv, rv);

    JSObject *class_obj;
    holder->GetJSObject(&class_obj);
    NS_ASSERTION(class_obj, "The return value lied");

    const nsIID *primary_iid = &NS_GET_IID(nsISupports);

    if (name_struct->mType == nsGlobalNameStruct::eTypeClassProto) {
      primary_iid = &name_struct->mIID;
    } else if (ci_data && ci_data->mProtoChainInterface) {
      primary_iid = ci_data->mProtoChainInterface;
    }

    nsXPIDLCString class_parent_name;

    if (!primary_iid->Equals(NS_GET_IID(nsISupports))) {
      rv = DefineInterfaceConstants(cx, class_obj, primary_iid);
      NS_ENSURE_SUCCESS(rv, rv);

      // Special case for |Node|, which needs constants from Node3
      // too for forwards compatibility.
      if (primary_iid->Equals(NS_GET_IID(nsIDOMNode))) {
        rv = DefineInterfaceConstants(cx, class_obj,
                                      &NS_GET_IID(nsIDOM3Node));
        NS_ENSURE_SUCCESS(rv, rv);
      }

      // Special case for |Event|, Event needs constants from NSEvent
      // too for backwards compatibility.
      if (primary_iid->Equals(NS_GET_IID(nsIDOMEvent))) {
        rv = DefineInterfaceConstants(cx, class_obj,
                                      &NS_GET_IID(nsIDOMNSEvent));
        NS_ENSURE_SUCCESS(rv, rv);
      }

      nsCOMPtr<nsIInterfaceInfoManager> iim =
        dont_AddRef(XPTI_GetInterfaceInfoManager());
      NS_ENSURE_TRUE(iim, NS_ERROR_NOT_AVAILABLE);

      nsCOMPtr<nsIInterfaceInfo> if_info;
      iim->GetInfoForIID(primary_iid, getter_AddRefs(if_info));
      NS_ENSURE_TRUE(if_info, NS_ERROR_UNEXPECTED);

      nsCOMPtr<nsIInterfaceInfo> parent;
      nsIID *iid = nsnull;

      if (ci_data && !ci_data->mHasClassInterface) {
        if_info->GetInterfaceIID(&iid);
      } else {
        if_info->GetParent(getter_AddRefs(parent));
        NS_ENSURE_TRUE(parent, NS_ERROR_UNEXPECTED);

        parent->GetInterfaceIID(&iid);
      }

      if (iid) {
        if (!iid->Equals(NS_GET_IID(nsISupports))) {
          if (ci_data && !ci_data->mHasClassInterface) {
            // If the class doesn't have a class interface the primary
            // interface is the interface that should be
            // constructor.prototype.__proto__.

            if_info->GetName(getter_Copies(class_parent_name));
          } else {
            // If the class does have a class interface (or there's no
            // real class for this name) then the parent of the
            // primary interface is what we want on
            // constructor.prototype.__proto__.

            NS_ASSERTION(parent, "Whoa, this is bad, null parent here!");

            parent->GetName(getter_Copies(class_parent_name));
          }
        }

        nsMemory::Free(iid);
      }
    }

    JSObject *proto = nsnull;

    if (class_parent_name) {
      jsval val;

      if (!::JS_GetProperty(cx, obj, CutPrefix(class_parent_name), &val)) {
        return NS_ERROR_UNEXPECTED;
      }

      JSObject *tmp = JSVAL_IS_OBJECT(val) ? JSVAL_TO_OBJECT(val) : nsnull;

      if (tmp) {
        if (!::JS_GetProperty(cx, tmp, "prototype", &val)) {
          return NS_ERROR_UNEXPECTED;
        }

        if (JSVAL_IS_OBJECT(val)) {
          proto = JSVAL_TO_OBJECT(val);
        }
      }
    }

    JSObject *dot_prototype = nsnull;

    if (name_struct->mType == nsGlobalNameStruct::eTypeExternalConstructorAlias) {
      name_struct = alias_struct;
    }

    if (name_struct->mType == nsGlobalNameStruct::eTypeClassConstructor) {
      PRInt32 id = name_struct->mDOMClassInfoID;
      NS_ABORT_IF_FALSE(id >= 0, "Negative DOM classinfo?!?");

      nsDOMClassInfoID ci_id = (nsDOMClassInfoID)id;

      nsCOMPtr<nsIClassInfo> ci(GetClassInfoInstance(ci_id));
      NS_ENSURE_TRUE(ci, NS_ERROR_UNEXPECTED);

      nsCOMPtr<nsIXPConnectJSObjectHolder> proto_holder;

      // In most cases we want to find the wrapped native prototype in
      // aWin's scope and use that prototype for
      // ClassName.prototype. But in the case where we're setting up
      // "Window.prototype" or "ChromeWindow.prototype" we want to do
      // the look up in aWin's outer window's scope since the inner
      // window's wrapped native prototype comes from the outer
      // window's scope.
      nsGlobalWindow *scopeWindow;

      if (ci_id == eDOMClassInfo_Window_id ||
          ci_id == eDOMClassInfo_ChromeWindow_id) {
        scopeWindow = aWin->GetOuterWindowInternal();

        if (!scopeWindow) {
          scopeWindow = aWin;
        }
      } else {
        scopeWindow = aWin;
      }

      rv =
        sXPConnect->GetWrappedNativePrototype(cx,
                                              scopeWindow->GetGlobalJSObject(),
                                              ci,
                                              getter_AddRefs(proto_holder));
      NS_ENSURE_SUCCESS(rv, NS_ERROR_UNEXPECTED);

      rv = proto_holder->GetJSObject(&dot_prototype);
      NS_ENSURE_SUCCESS(rv, NS_ERROR_UNEXPECTED);

      JSObject *xpc_proto_proto = ::JS_GetPrototype(cx, dot_prototype);

      if (proto && JS_GET_CLASS(cx, xpc_proto_proto) == sObjectClass) {
        if (!::JS_SetPrototype(cx, dot_prototype, proto)) {
          return NS_ERROR_UNEXPECTED;
        }
      }
    } else if (name_struct->mType == nsGlobalNameStruct::eTypeExternalClassInfo) {
      nsCOMPtr<nsIClassInfo> ci = GetClassInfoInstance(name_struct->mData);
      NS_ENSURE_TRUE(ci, NS_ERROR_UNEXPECTED);

      nsCOMPtr<nsIXPConnectJSObjectHolder> proto_holder;

      rv =
        sXPConnect->GetWrappedNativePrototype(cx, obj, ci,
                                              getter_AddRefs(proto_holder));
      NS_ENSURE_SUCCESS(rv, NS_ERROR_UNEXPECTED);

      rv = proto_holder->GetJSObject(&dot_prototype);
      NS_ENSURE_SUCCESS(rv, NS_ERROR_UNEXPECTED);

      JSObject *xpc_proto_proto = ::JS_GetPrototype(cx, dot_prototype);

      if (proto && JS_GET_CLASS(cx, xpc_proto_proto) == sObjectClass) {
        if (!::JS_SetPrototype(cx, dot_prototype, proto)) {
          return NS_ERROR_UNEXPECTED;
        }
      }
    } else {
      dot_prototype = ::JS_NewObject(cx, &sDOMConstructorProtoClass, proto,
                                     obj);
      NS_ENSURE_TRUE(dot_prototype, NS_ERROR_OUT_OF_MEMORY);
    }

    v = OBJECT_TO_JSVAL(dot_prototype);

    // Per ECMA, the prototype property is {DontEnum, DontDelete, ReadOnly}
    if (!::JS_DefineProperty(cx, class_obj, "prototype", v, nsnull, nsnull,
                             JSPROP_PERMANENT | JSPROP_READONLY)) {
      return NS_ERROR_UNEXPECTED;
    }

    *did_resolve = PR_TRUE;

    return NS_OK;
  }

  if (name_struct->mType == nsGlobalNameStruct::eTypeExternalConstructor) {
    nsRefPtr<nsDOMConstructor> constructor;
    rv = nsDOMConstructor::Create(class_name,
                                  NS_STATIC_CAST(nsPIDOMWindow*, aWin),
                                  getter_AddRefs(constructor));
    NS_ENSURE_SUCCESS(rv, rv);

    jsval val;
    nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
    rv = WrapNative(cx, obj, constructor, NS_GET_IID(nsIDOMConstructor), &val,
                    getter_AddRefs(holder));
    NS_ENSURE_SUCCESS(rv, rv);

    rv = constructor->Install(cx, obj, val);
    NS_ENSURE_SUCCESS(rv, rv);

    JSObject* class_obj;
    holder->GetJSObject(&class_obj);
    NS_ASSERTION(class_obj, "Why didn't we get a JSObject?");

    *did_resolve = PR_TRUE;

    return NS_OK;
  }

  if (name_struct->mType == nsGlobalNameStruct::eTypeProperty) {
    nsCOMPtr<nsISupports> native(do_CreateInstance(name_struct->mCID, &rv));
    NS_ENSURE_SUCCESS(rv, rv);

    jsval prop_val; // Property value.

    nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
    nsCOMPtr<nsIScriptObjectOwner> owner(do_QueryInterface(native));
    if (owner) {
      nsIScriptContext *context = nsJSUtils::GetStaticScriptContext(cx, obj);
      NS_ENSURE_TRUE(context, NS_ERROR_UNEXPECTED);

      JSObject *prop_obj = nsnull;
      rv = owner->GetScriptObject(context, (void**)&prop_obj);
      NS_ENSURE_TRUE(prop_obj, NS_ERROR_UNEXPECTED);

      prop_val = OBJECT_TO_JSVAL(prop_obj);
    } else {
      JSObject *scope;

      if (aWin->IsOuterWindow()) {
        nsGlobalWindow *inner = aWin->GetCurrentInnerWindowInternal();
        NS_ENSURE_TRUE(inner, NS_ERROR_UNEXPECTED);

        scope = inner->GetGlobalJSObject();
      } else {
        scope = aWin->GetGlobalJSObject();
      }

      rv = WrapNative(cx, scope, native, NS_GET_IID(nsISupports), &prop_val,
                      getter_AddRefs(holder));
    }

    NS_ENSURE_SUCCESS(rv, rv);

    PRBool retval = ::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
                                          ::JS_GetStringLength(str),
                                          prop_val, nsnull, nsnull,
                                          JSPROP_ENUMERATE);
    *did_resolve = PR_TRUE;

    return retval ? NS_OK : NS_ERROR_FAILURE;
  }

  if (name_struct->mType == nsGlobalNameStruct::eTypeDynamicNameSet) {
    nsCOMPtr<nsIScriptExternalNameSet> nameset =
      do_CreateInstance(name_struct->mCID, &rv);
    NS_ENSURE_SUCCESS(rv, rv);

    nsIScriptContext *context = aWin->GetContext();
    NS_ENSURE_TRUE(context, NS_ERROR_UNEXPECTED);

    rv = nameset->InitializeNameSet(context);

    *did_resolve = PR_TRUE;
  }

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 3890 of file nsDOMClassInfo.cpp.

{
  // Someone is accessing a element by referencing its name/id in the
  // global scope, do a security check to make sure that's ok.

  nsresult rv =
    sSecMan->CheckPropertyAccess(cx, GetGlobalJSObject(cx, obj), "Window", id,
                                 nsIXPCSecurityManager::ACCESS_GET_PROPERTY);

  if (NS_FAILED(rv)) {
    // The security check failed. The security manager set a JS
    // exception for us.

    return JS_FALSE;
  }

  // Print a warning on the console so developers have a chance to
  // catch and fix these mistakes.
  PrintWarningOnConsole(cx, "GlobalScopeElementReference");

  return JS_TRUE;
}

Here is the call graph for this function:

JSBool JS_DLL_CALLBACK nsWindowSH::GlobalScopePolluterNewResolve ( JSContext cx,
JSObject obj,
jsval  id,
uintN  flags,
JSObject **  objp 
) [static]

Definition at line 3933 of file nsDOMClassInfo.cpp.

{
  if (flags & (JSRESOLVE_ASSIGNING | JSRESOLVE_DECLARING |
               JSRESOLVE_CLASSNAME | JSRESOLVE_QUALIFIED) ||
      !JSVAL_IS_STRING(id)) {
    // Nothing to do here if we're either assigning or declaring,
    // resolving a class name, doing a qualified resolve, or
    // resolving a number.

    return JS_TRUE;
  }

  nsIHTMLDocument *doc = (nsIHTMLDocument *)::JS_GetPrivate(cx, obj);

  if (!doc || doc->GetCompatibilityMode() != eCompatibility_NavQuirks) {
    // If we don't have a document, or if the document is not in
    // quirks mode, return early.

    return JS_TRUE;
  }

  JSObject *proto = ::JS_GetPrototype(cx, obj);
  JSString *jsstr = JSVAL_TO_STRING(id);
  JSBool hasProp;

  if (!proto || !::JS_HasUCProperty(cx, proto, ::JS_GetStringChars(jsstr),
                                    ::JS_GetStringLength(jsstr), &hasProp) ||
      hasProp) {
    // No prototype, or the property exists on the prototype. Do
    // nothing.

    return JS_TRUE;
  }

  nsDependentJSString str(jsstr);
  nsCOMPtr<nsISupports> result;

  {
    nsCOMPtr<nsIDOMDocument> dom_doc(do_QueryInterface(doc));
    nsCOMPtr<nsIDOMElement> element;

    dom_doc->GetElementById(str, getter_AddRefs(element));

    result = element;
  }

  if (!result) {
    doc->ResolveName(str, nsnull, getter_AddRefs(result));
  }

  if (result) {
    jsval v;
    nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
    nsresult rv = WrapNative(cx, obj, result, NS_GET_IID(nsISupports), &v,
                             getter_AddRefs(holder));
    NS_ENSURE_SUCCESS(rv, rv);

    if (!::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(jsstr),
                               ::JS_GetStringLength(jsstr), v, nsnull, nsnull,
                               0)) {
      nsDOMClassInfo::ThrowJSException(cx, NS_ERROR_UNEXPECTED);

      return JS_FALSE;
    }

    *objp = obj;
  }

  return JS_TRUE;
}

Here is the call graph for this function:

nsresult nsDOMClassInfo::Init ( void  ) [static, protected, inherited]

Definition at line 1696 of file nsDOMClassInfo.cpp.

{
  /* Errors that can trigger early returns are done first,
     otherwise nsDOMClassInfo is left in a half inited state. */
  NS_ASSERTION(sizeof(PtrBits) == sizeof(void*),
               "BAD! You'll need to adjust the size of PtrBits to the size "
               "of a pointer on your platform.");

  NS_ENSURE_TRUE(!sIsInitialized, NS_ERROR_ALREADY_INITIALIZED);

  extern nsScriptNameSpaceManager *gNameSpaceManager;
  NS_ENSURE_TRUE(gNameSpaceManager, NS_ERROR_NOT_INITIALIZED);

  nsresult rv = CallGetService(nsIXPConnect::GetCID(), &sXPConnect);
  NS_ENSURE_SUCCESS(rv, rv);

  nsCOMPtr<nsIXPCFunctionThisTranslator> old;

  nsCOMPtr<nsIXPCFunctionThisTranslator> elt = new nsEventListenerThisTranslator();
  NS_ENSURE_TRUE(elt, NS_ERROR_OUT_OF_MEMORY);

  sXPConnect->SetFunctionThisTranslator(NS_GET_IID(nsIDOMEventListener),
                                        elt, getter_AddRefs(old));

  nsCOMPtr<nsIScriptSecurityManager> sm =
    do_GetService("@mozilla.org/scriptsecuritymanager;1", &rv);
  NS_ENSURE_SUCCESS(rv, rv);

  sSecMan = sm;
  NS_ADDREF(sSecMan);

  nsCOMPtr<nsIThreadJSContextStack> stack =
    do_GetService("@mozilla.org/js/xpc/ContextStack;1", &rv);
  NS_ENSURE_SUCCESS(rv, rv);

  JSContext *cx = nsnull;

  rv = stack->GetSafeJSContext(&cx);
  NS_ENSURE_SUCCESS(rv, rv);

  nsCOMPtr<nsIComponentRegistrar> cr;
  NS_GetComponentRegistrar(getter_AddRefs(cr));

  const nsIID* xpathEvaluatorIID = nsnull;
  if (cr) {
    PRBool haveXPathDOM;
    cr->IsContractIDRegistered(NS_XPATH_EVALUATOR_CONTRACTID,
                               &haveXPathDOM);
    if (haveXPathDOM) {
      xpathEvaluatorIID = &NS_GET_IID(nsIDOMXPathEvaluator);
    }
  }

  DOM_CLASSINFO_MAP_BEGIN(Window, nsIDOMWindow)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSWindow)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMViewCSS)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMAbstractView)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Location, nsIDOMLocation)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMLocation)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSLocation)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Navigator, nsIDOMNavigator)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNavigator)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNavigator_MOZILLA_1_8_BRANCH)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSNavigator)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMClientInformation)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Plugin, nsIDOMPlugin)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMPlugin)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(PluginArray, nsIDOMPluginArray)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMPluginArray)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSPluginArray)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(MimeType, nsIDOMMimeType)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMMimeType)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(MimeTypeArray, nsIDOMMimeTypeArray)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMMimeTypeArray)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(BarProp, nsIDOMBarProp)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMBarProp)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(History, nsIDOMHistory)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHistory)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHistory)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Screen, nsIDOMScreen)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMScreen)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Constructor, nsIDOMConstructor)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMConstructor)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(XMLDocument, nsIDOMXMLDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMXMLDocument)
    DOM_CLASSINFO_DOCUMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END_WITH_XPATH

  DOM_CLASSINFO_MAP_BEGIN(DocumentType, nsIDOMDocumentType)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentType)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(DOMImplementation, nsIDOMDOMImplementation)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMImplementation)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(DOMException, nsIDOMDOMException)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMException)
    DOM_CLASSINFO_MAP_ENTRY(nsIException)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(DocumentFragment, nsIDOMDocumentFragment)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocumentFragment)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Element, nsIDOMElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Attr, nsIDOMAttr)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMAttr)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Text, nsIDOMText)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMText)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Comment, nsIDOMComment)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMComment)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CDATASection, nsIDOMCDATASection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCDATASection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(ProcessingInstruction, nsIDOMProcessingInstruction)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMProcessingInstruction)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Entity, nsIDOMEntity)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEntity)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(EntityReference, nsIDOMEntityReference)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEntityReference)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Notation, nsIDOMNotation)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNotation)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(NodeList, nsIDOMNodeList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNodeList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(NamedNodeMap, nsIDOMNamedNodeMap)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNamedNodeMap)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(DocumentStyleSheetList,
                                      nsIDOMStyleSheetList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMStyleSheetList)
  DOM_CLASSINFO_MAP_END
  
  DOM_CLASSINFO_MAP_BEGIN(Event, nsIDOMEvent)
    DOM_CLASSINFO_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(PopupBlockedEvent, nsIDOMPopupBlockedEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMPopupBlockedEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMPopupBlockedEvent_MOZILLA_1_8_BRANCH)
    DOM_CLASSINFO_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SmartCardEvent, nsIDOMSmartCardEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSmartCardEvent)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(PageTransitionEvent, nsIDOMPageTransitionEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMPageTransitionEvent)
    DOM_CLASSINFO_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(MutationEvent, nsIDOMMutationEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMMutationEvent)
    DOM_CLASSINFO_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(UIEvent, nsIDOMUIEvent)
    DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END
  
  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(KeyboardEvent, nsIDOMKeyEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMKeyEvent)
    DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(MouseEvent, nsIDOMMouseEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMMouseEvent)
    DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLDocument, nsIDOMHTMLDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLDocument)
    DOM_CLASSINFO_DOCUMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END_WITH_XPATH

  DOM_CLASSINFO_MAP_BEGIN(HTMLCollection, nsIDOMHTMLCollection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNodeList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLOptionsCollection, nsIDOMHTMLOptionsCollection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLOptionsCollection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLOptionCollection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLFormControlCollection,
                                      nsIDOMHTMLCollection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLFormControlList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLGenericCollection,
                                      nsIDOMHTMLCollection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLAnchorElement, nsIDOMHTMLAnchorElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLAnchorElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLAnchorElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLAppletElement, nsIDOMHTMLAppletElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLAppletElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLAreaElement, nsIDOMHTMLAreaElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLAreaElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLAreaElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLBRElement, nsIDOMHTMLBRElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLBRElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLBaseElement, nsIDOMHTMLBaseElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLBaseElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLBaseFontElement, nsIDOMHTMLBaseFontElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLBaseFontElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLBodyElement, nsIDOMHTMLBodyElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLBodyElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLButtonElement, nsIDOMHTMLButtonElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLButtonElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLButtonElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLDListElement, nsIDOMHTMLDListElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLDListElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLDelElement, nsIDOMHTMLElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLModElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLDirectoryElement, nsIDOMHTMLDirectoryElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLDirectoryElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLDivElement, nsIDOMHTMLDivElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLDivElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLEmbedElement, nsIDOMHTMLEmbedElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLEmbedElement)
#ifdef MOZ_SVG
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMGetSVGDocument)
#endif
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLFieldSetElement, nsIDOMHTMLFieldSetElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLFieldSetElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLFontElement, nsIDOMHTMLFontElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLFontElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLFormElement, nsIDOMHTMLFormElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLFormElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLFormElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLFrameElement, nsIDOMHTMLFrameElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLFrameElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLFrameElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLFrameSetElement, nsIDOMHTMLFrameSetElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLFrameSetElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLHRElement, nsIDOMHTMLHRElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLHRElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLHRElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLHeadElement, nsIDOMHTMLHeadElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLHeadElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLHeadingElement, nsIDOMHTMLHeadingElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLHeadingElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLHtmlElement, nsIDOMHTMLHtmlElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLHtmlElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLIFrameElement, nsIDOMHTMLIFrameElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLIFrameElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLFrameElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLImageElement, nsIDOMHTMLImageElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLImageElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLImageElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLInputElement, nsIDOMHTMLInputElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLInputElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLInputElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLInsElement, nsIDOMHTMLElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLModElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLIsIndexElement, nsIDOMHTMLIsIndexElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLIsIndexElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLLIElement, nsIDOMHTMLLIElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLLIElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLLabelElement, nsIDOMHTMLLabelElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLLabelElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLLegendElement, nsIDOMHTMLLegendElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLLegendElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLLinkElement, nsIDOMHTMLLinkElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLLinkElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMLinkStyle)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLMapElement, nsIDOMHTMLMapElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLMapElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLMenuElement, nsIDOMHTMLMenuElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLMenuElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLMetaElement, nsIDOMHTMLMetaElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLMetaElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLModElement, nsIDOMHTMLModElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLModElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLOListElement, nsIDOMHTMLOListElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLOListElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLObjectElement, nsIDOMHTMLObjectElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLObjectElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLOptGroupElement, nsIDOMHTMLOptGroupElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLOptGroupElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLOptionElement, nsIDOMHTMLOptionElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLOptionElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLOptionElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLParagraphElement, nsIDOMHTMLParagraphElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLParagraphElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLParamElement, nsIDOMHTMLParamElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLParamElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLPreElement, nsIDOMHTMLPreElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLPreElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLQuoteElement, nsIDOMHTMLQuoteElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLQuoteElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLScriptElement, nsIDOMHTMLScriptElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLScriptElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLSelectElement, nsIDOMHTMLSelectElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLSelectElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLSelectElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSXBLFormControl)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLSpacerElement, nsIDOMHTMLElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLSpanElement, nsIDOMHTMLElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLStyleElement, nsIDOMHTMLStyleElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLStyleElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMLinkStyle)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLTableCaptionElement,
                          nsIDOMHTMLTableCaptionElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTableCaptionElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLTableCellElement, nsIDOMHTMLTableCellElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTableCellElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLTableColElement, nsIDOMHTMLTableColElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTableColElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END


  // This should be removed, there are no users of this class any more.

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLTableColGroupElement,
                                      nsIDOMHTMLTableColElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTableColElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLTableElement, nsIDOMHTMLTableElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTableElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLTableRowElement, nsIDOMHTMLTableRowElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTableRowElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLTableSectionElement,
                          nsIDOMHTMLTableSectionElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTableSectionElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLTextAreaElement, nsIDOMHTMLTextAreaElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTextAreaElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLTextAreaElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLTitleElement, nsIDOMHTMLTitleElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLTitleElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(HTMLUListElement, nsIDOMHTMLUListElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLUListElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLUnknownElement, nsIDOMHTMLElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(HTMLWBRElement, nsIDOMHTMLElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CSSStyleRule, nsIDOMCSSStyleRule)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleRule)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CSSCharsetRule, nsIDOMCSSCharsetRule)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSCharsetRule)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CSSImportRule, nsIDOMCSSImportRule)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSImportRule)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CSSMediaRule, nsIDOMCSSMediaRule)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSMediaRule)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(CSSNameSpaceRule, nsIDOMCSSRule)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSRule)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CSSRuleList, nsIDOMCSSRuleList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSRuleList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(CSSGroupRuleRuleList, nsIDOMCSSRuleList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSRuleList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(MediaList, nsIDOMMediaList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMMediaList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(StyleSheetList, nsIDOMStyleSheetList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMStyleSheetList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CSSStyleSheet, nsIDOMCSSStyleSheet)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleSheet)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CSSStyleDeclaration, nsIDOMCSSStyleDeclaration)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSS2Properties)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSCSS2Properties)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ComputedCSSStyleDeclaration,
                                      nsIDOMCSSStyleDeclaration)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSS2Properties)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSCSS2Properties)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ROCSSPrimitiveValue,
                                      nsIDOMCSSPrimitiveValue)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSPrimitiveValue)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CSSValueList, nsIDOMCSSValueList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSValueList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(CSSRect, nsIDOMRect)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMRect)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(CSSRGBColor, nsIDOMRGBColor)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMRGBColor)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Range, nsIDOMRange)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMRange)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSRange)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(TreeWalker, nsIDOMTreeWalker)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMTreeWalker)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Selection, nsISelection)
    DOM_CLASSINFO_MAP_ENTRY(nsISelection)
  DOM_CLASSINFO_MAP_END

#ifdef MOZ_XUL
  DOM_CLASSINFO_MAP_BEGIN(XULDocument, nsIDOMXULDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULDocument_MOZILLA_1_8_BRANCH)
    DOM_CLASSINFO_DOCUMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END_WITH_XPATH

  DOM_CLASSINFO_MAP_BEGIN(XULElement, nsIDOMXULElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(XULCommandDispatcher, nsIDOMXULCommandDispatcher)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULCommandDispatcher)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XULNodeList, nsIDOMNodeList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNodeList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XULNamedNodeMap, nsIDOMNamedNodeMap)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNamedNodeMap)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XULAttr, nsIDOMAttr)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMAttr)
  DOM_CLASSINFO_MAP_END
#endif

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XULControllers, nsIControllers)
    DOM_CLASSINFO_MAP_ENTRY(nsIControllers)
  DOM_CLASSINFO_MAP_END

#ifdef MOZ_XUL
  DOM_CLASSINFO_MAP_BEGIN(BoxObject, nsIBoxObject)
    DOM_CLASSINFO_MAP_ENTRY(nsIBoxObject)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(TreeSelection, nsITreeSelection)
    DOM_CLASSINFO_MAP_ENTRY(nsITreeSelection)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(TreeContentView, nsITreeContentView)
    DOM_CLASSINFO_MAP_ENTRY(nsITreeContentView)
    DOM_CLASSINFO_MAP_ENTRY(nsITreeView)
  DOM_CLASSINFO_MAP_END
#endif

  DOM_CLASSINFO_MAP_BEGIN(Crypto, nsIDOMCrypto)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCrypto)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CRMFObject, nsIDOMCRMFObject)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCRMFObject)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(Pkcs11, nsIDOMPkcs11)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMPkcs11)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XMLStylesheetProcessingInstruction, nsIDOMProcessingInstruction)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMProcessingInstruction)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMLinkStyle)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ChromeWindow, nsIDOMWindow)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindow)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMJSWindow)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMWindowInternal)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMChromeWindow)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    // XXXjst: Do we want this on chrome windows?
    // DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageWindow)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMViewCSS)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMAbstractView)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(RangeException, nsIDOMRangeException)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMRangeException)
    DOM_CLASSINFO_MAP_ENTRY(nsIException)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(ContentList, nsIDOMHTMLCollection)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNodeList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCollection)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(ImageDocument, nsIImageDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIImageDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNSHTMLDocument)
    DOM_CLASSINFO_DOCUMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END_WITH_XPATH

#ifdef MOZ_XUL
  DOM_CLASSINFO_MAP_BEGIN(XULTemplateBuilder, nsIXULTemplateBuilder)
    DOM_CLASSINFO_MAP_ENTRY(nsIXULTemplateBuilder)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(XULTreeBuilder, nsIXULTreeBuilder)
    DOM_CLASSINFO_MAP_ENTRY(nsIXULTreeBuilder)
    DOM_CLASSINFO_MAP_ENTRY(nsITreeView)
  DOM_CLASSINFO_MAP_END
#endif

  DOM_CLASSINFO_MAP_BEGIN(DOMStringList, nsIDOMDOMStringList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDOMStringList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(NameList, nsIDOMNameList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMNameList)
  DOM_CLASSINFO_MAP_END

#ifdef MOZ_XUL
  DOM_CLASSINFO_MAP_BEGIN(TreeColumn, nsITreeColumn)
    DOM_CLASSINFO_MAP_ENTRY(nsITreeColumn)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(TreeColumns, nsITreeColumns)
    DOM_CLASSINFO_MAP_ENTRY(nsITreeColumns)
  DOM_CLASSINFO_MAP_END
#endif

  DOM_CLASSINFO_MAP_BEGIN(CSSMozDocumentRule, nsIDOMCSSMozDocumentRule)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSMozDocumentRule)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(BeforeUnloadEvent, nsIDOMBeforeUnloadEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMBeforeUnloadEvent)
    DOM_CLASSINFO_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

#ifdef MOZ_SVG
#define DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES \
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGElement) \
    DOM_CLASSINFO_MAP_ENTRY(nsIDOM3Node)

#define DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES \
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)        \
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLocatable)       \
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTransformable)   \
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)        \
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES

  // XXX - the proto chain stuff is sort of hackish, because of the MI in
  // the SVG interfaces. I doubt that extending the proto on one interface
  // works properly on an element which inherits off multiple interfaces.
  // Tough luck. - bbaetz

  // The SVG document

  DOM_CLASSINFO_MAP_BEGIN(SVGDocument, nsIDOMSVGDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGDocument)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocument)
    DOM_CLASSINFO_DOCUMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END_WITH_XPATH

  // SVG element classes

  DOM_CLASSINFO_MAP_BEGIN(SVGCircleElement, nsIDOMSVGCircleElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGCircleElement)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGClipPathElement, nsIDOMSVGClipPathElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGClipPathElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLocatable)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTransformable)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGDefsElement, nsIDOMSVGDefsElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGDefsElement)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGDescElement, nsIDOMSVGDescElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGDescElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGEllipseElement, nsIDOMSVGEllipseElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGEllipseElement)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGGElement, nsIDOMSVGGElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGGElement)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGGradientElement, nsIDOMSVGGradientElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGGradientElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGImageElement, nsIDOMSVGImageElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGImageElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGLinearGradientElement, nsIDOMSVGLinearGradientElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGGradientElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLinearGradientElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGLineElement, nsIDOMSVGLineElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLineElement)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGMarkerElement, nsIDOMSVGMarkerElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGMarkerElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGMetadataElement, nsIDOMSVGMetadataElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGMetadataElement)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathElement, nsIDOMSVGPathElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedPathData)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPolygonElement, nsIDOMSVGPolygonElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPolygonElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedPoints)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPolylineElement, nsIDOMSVGPolylineElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPolylineElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedPoints)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGRadialGradientElement, nsIDOMSVGRadialGradientElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGGradientElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGRadialGradientElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGRectElement, nsIDOMSVGRectElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGRectElement)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGScriptElement, nsIDOMSVGScriptElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGScriptElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGStopElement, nsIDOMSVGStopElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStopElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END
  
  DOM_CLASSINFO_MAP_BEGIN(SVGStyleElement, nsIDOMSVGStyleElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStyleElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMLinkStyle)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGSVGElement, nsIDOMSVGSVGElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSVGElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLocatable)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGZoomAndPan)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGSymbolElement, nsIDOMSVGSymbolElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGSymbolElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFitToViewBox)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGTextElement, nsIDOMSVGTextElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextPositioningElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextContentElement)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGTitleElement, nsIDOMSVGTitleElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTitleElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGTSpanElement, nsIDOMSVGTSpanElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextPositioningElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextContentElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGUseElement, nsIDOMSVGUseElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGUseElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  // other SVG classes

  DOM_CLASSINFO_MAP_BEGIN(SVGAngle, nsIDOMSVGAngle)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAngle)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedAngle, nsIDOMSVGAnimatedAngle)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedAngle)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedEnumeration, nsIDOMSVGAnimatedEnumeration)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedEnumeration)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedLength, nsIDOMSVGAnimatedLength)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedLength)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedLengthList, nsIDOMSVGAnimatedLengthList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedLengthList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedNumber, nsIDOMSVGAnimatedNumber)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedNumber)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedNumberList, nsIDOMSVGAnimatedNumberList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedNumberList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedPoints, nsIDOMSVGAnimatedPoints)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedPoints)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedPreserveAspectRatio, nsIDOMSVGAnimatedPreserveAspectRatio)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedPreserveAspectRatio)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedRect, nsIDOMSVGAnimatedRect)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedRect)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedString, nsIDOMSVGAnimatedString)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedString)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedTransformList, nsIDOMSVGAnimatedTransformList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedTransformList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGEvent, nsIDOMSVGEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGEvent)
    DOM_CLASSINFO_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGException, nsIDOMSVGException)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGException)
    DOM_CLASSINFO_MAP_ENTRY(nsIException)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGLength, nsIDOMSVGLength)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLength)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGLengthList, nsIDOMSVGLengthList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLengthList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGMatrix, nsIDOMSVGMatrix)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGMatrix)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGNumber, nsIDOMSVGNumber)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGNumber)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGNumberList, nsIDOMSVGNumberList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGNumberList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegArcAbs, nsIDOMSVGPathSegArcAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegArcAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegArcRel, nsIDOMSVGPathSegArcRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegArcRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegClosePath, nsIDOMSVGPathSegClosePath)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegClosePath)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegCurvetoCubicAbs, nsIDOMSVGPathSegCurvetoCubicAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegCurvetoCubicAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegCurvetoCubicRel, nsIDOMSVGPathSegCurvetoCubicRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegCurvetoCubicRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegCurvetoCubicSmoothAbs, nsIDOMSVGPathSegCurvetoCubicSmoothAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegCurvetoCubicSmoothAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegCurvetoCubicSmoothRel, nsIDOMSVGPathSegCurvetoCubicSmoothRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegCurvetoCubicSmoothRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegCurvetoQuadraticAbs, nsIDOMSVGPathSegCurvetoQuadraticAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegCurvetoQuadraticAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegCurvetoQuadraticRel, nsIDOMSVGPathSegCurvetoQuadraticRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegCurvetoQuadraticRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegCurvetoQuadraticSmoothAbs, nsIDOMSVGPathSegCurvetoQuadraticSmoothAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegCurvetoQuadraticSmoothAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegCurvetoQuadraticSmoothRel, nsIDOMSVGPathSegCurvetoQuadraticSmoothRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegCurvetoQuadraticSmoothRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegLinetoAbs, nsIDOMSVGPathSegLinetoAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegLinetoAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegLinetoHorizontalAbs, nsIDOMSVGPathSegLinetoHorizontalAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegLinetoHorizontalAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegLinetoHorizontalRel, nsIDOMSVGPathSegLinetoHorizontalRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegLinetoHorizontalRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegLinetoRel, nsIDOMSVGPathSegLinetoRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegLinetoRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegLinetoVerticalAbs, nsIDOMSVGPathSegLinetoVerticalAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegLinetoVerticalAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegLinetoVerticalRel, nsIDOMSVGPathSegLinetoVerticalRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegLinetoVerticalRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegList, nsIDOMSVGPathSegList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegMovetoAbs, nsIDOMSVGPathSegMovetoAbs)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegMovetoAbs)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPathSegMovetoRel, nsIDOMSVGPathSegMovetoRel)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPathSegMovetoRel)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPoint, nsIDOMSVGPoint)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPoint)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPointList, nsIDOMSVGPointList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPointList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGPreserveAspectRatio, nsIDOMSVGPreserveAspectRatio)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPreserveAspectRatio)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGRect, nsIDOMSVGRect)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGRect)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGTransform, nsIDOMSVGTransform)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTransform)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGTransformList, nsIDOMSVGTransformList)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTransformList)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(SVGZoomEvent, nsIDOMSVGZoomEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGZoomEvent)
    DOM_CLASSINFO_EVENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END
#endif // MOZ_SVG

  DOM_CLASSINFO_MAP_BEGIN(HTMLCanvasElement, nsIDOMHTMLCanvasElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMHTMLCanvasElement)
    DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END

#ifdef MOZ_ENABLE_CANVAS
  DOM_CLASSINFO_MAP_BEGIN(CanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCanvasRenderingContext2D)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CanvasGradient, nsIDOMCanvasGradient)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCanvasGradient)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(CanvasPattern, nsIDOMCanvasPattern)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMCanvasPattern)
  DOM_CLASSINFO_MAP_END
#endif // MOZ_ENABLE_CANVAS

#if defined(MOZ_SVG)
  DOM_CLASSINFO_MAP_BEGIN(SVGTextPathElement, nsIDOMSVGTextPathElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTextContentElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGStylable)
    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END
#endif

  // We just want this to have classinfo so it gets mark callbacks for marking
  // event listeners.
  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(WindowRoot, nsISupports)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(DOMParser, nsIDOMParser)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMParser)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XMLSerializer, nsIDOMSerializer)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSerializer)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN(XMLHttpRequest, nsIXMLHttpRequest)
    DOM_CLASSINFO_MAP_ENTRY(nsIXMLHttpRequest)
    DOM_CLASSINFO_MAP_ENTRY(nsIJSXMLHttpRequest)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
    DOM_CLASSINFO_MAP_ENTRY(nsIInterfaceRequestor)
  DOM_CLASSINFO_MAP_END

  DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XMLHttpProgressEvent, nsIDOMEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEvent)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMLSProgressEvent)
  DOM_CLASSINFO_MAP_END

#if defined(MOZ_SVG) && defined(MOZ_SVG_FOREIGNOBJECT)
  DOM_CLASSINFO_MAP_BEGIN(SVGForeignObjectElement, nsIDOMSVGForeignObjectElement)
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGForeignObjectElement)
    DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
  DOM_CLASSINFO_MAP_END
#endif

   DOM_CLASSINFO_MAP_BEGIN(Storage, nsIDOMStorage)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorage)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(StorageList, nsIDOMStorageList)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageList)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(StorageItem, nsIDOMStorageItem)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageItem)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMToString)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(StorageEvent, nsIDOMStorageEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMStorageEvent)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(XULCommandEvent, nsIDOMXULCommandEvent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULCommandEvent)
     DOM_CLASSINFO_UI_EVENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END

#ifdef NS_DEBUG
  {
    PRUint32 i = sizeof(sClassInfoData) / sizeof(sClassInfoData[0]);

    if (i != eDOMClassInfoIDCount) {
      NS_ERROR("The number of items in sClassInfoData doesn't match the "
               "number of nsIDOMClassInfo ID's, this is bad! Fix it!");

      return NS_ERROR_NOT_INITIALIZED;
    }

    for (i = 0; i < eDOMClassInfoIDCount; i++) {
      if (!sClassInfoData[i].u.mConstructorFptr ||
          sClassInfoData[i].mDebugID != i) {
        NS_ERROR("Class info data out of sync, you forgot to update "
                 "nsDOMClassInfo.h and nsDOMClassInfo.cpp! Fix this, "
                 "mozilla will not work without this fixed!");

        return NS_ERROR_NOT_INITIALIZED;
      }
    }

    for (i = 0; i < eDOMClassInfoIDCount; i++) {
      if (!sClassInfoData[i].mInterfaces) {
        NS_ERROR("Class info data without an interface list! Fix this, "
                 "mozilla will not work without this fixed!");

        return NS_ERROR_NOT_INITIALIZED;
      }
    }
  }
#endif

  // Initialize static JSString's
  DefineStaticJSVals(cx);

  PRInt32 i;

  for (i = 0; i < eDOMClassInfoIDCount; ++i) {
    RegisterClassName(i);
  }

  for (i = 0; i < eDOMClassInfoIDCount; ++i) {
    RegisterClassProtos(i);
  }

  PRBool doSecurityCheckInAddProperty = sDoSecurityCheckInAddProperty;
  sDoSecurityCheckInAddProperty = PR_FALSE;
  RegisterExternalClasses();
  sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;

  sDisableDocumentAllSupport =
    nsContentUtils::GetBoolPref("browser.dom.document.all.disabled");

  sDisableGlobalScopePollutionSupport =
    nsContentUtils::GetBoolPref("browser.dom.global_scope_pollution.disabled");

  sIsInitialized = PR_TRUE;

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static nsresult nsDOMClassInfo::InitDOMJSClass ( JSContext cx,
JSObject obj 
) [static, inherited]

Definition at line 6450 of file nsDOMClassInfo.cpp.

{
  nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);

  if (win->IsInnerWindow() || win->IsFrozen()) {
    // Return the inner window, or the outer if we're dealing with a
    // frozen outer.

    *_retval = obj;
  } else {
    // Try to find the current inner window.

    nsGlobalWindow *inner = win->GetCurrentInnerWindowInternal();
    if (!inner) {
      // Yikes! No inner window! Instead of leaking the outer window into the
      // scope chain, let's return an error.

      *_retval = nsnull;

      return NS_ERROR_UNEXPECTED;
    }

    *_retval = inner->GetGlobalJSObject();
  }

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 4033 of file nsDOMClassInfo.cpp.

{
  // If global scope pollution is disabled, or if our document is not
  // a HTML document, do nothing
  if (sDisableGlobalScopePollutionSupport || !doc) {
    return NS_OK;
  }

  JSObject *gsp = ::JS_NewObject(cx, &sGlobalScopePolluterClass, nsnull, obj);
  if (!gsp) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  JSObject *o = obj, *proto;

  // Find the place in the prototype chain where we want this global
  // scope polluter (right before Object.prototype).

  while ((proto = ::JS_GetPrototype(cx, o))) {
    if (JS_GET_CLASS(cx, proto) == sObjectClass) {
      // Set the global scope polluters prototype to Object.prototype
      if (!::JS_SetPrototype(cx, gsp, proto)) {
        return NS_ERROR_UNEXPECTED;
      }

      break;
    }

    o = proto;
  }

  // And then set the prototype of the object whose prototype was
  // Object.prototype to be the global scope polluter.
  if (!::JS_SetPrototype(cx, o, gsp)) {
    return NS_ERROR_UNEXPECTED;
  }

  if (!::JS_SetPrivate(cx, gsp, doc)) {
    return NS_ERROR_UNEXPECTED;
  }

  // The global scope polluter will release doc on destruction (or
  // invalidation).
  NS_ADDREF(doc);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 4008 of file nsDOMClassInfo.cpp.

{
  JSObject *proto;

  while ((proto = ::JS_GetPrototype(cx, obj))) {
    if (JS_GET_CLASS(cx, proto) == &sGlobalScopePolluterClass) {
      nsIHTMLDocument *doc = (nsIHTMLDocument *)::JS_GetPrivate(cx, proto);

      NS_IF_RELEASE(doc);

      ::JS_SetPrivate(cx, proto, nsnull);

      // Pull the global scope polluter out of the prototype chain so
      // that it can be freed.
      ::JS_SetPrototype(cx, obj, ::JS_GetPrototype(cx, proto));

      break;
    }

    obj = proto;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool nsEventReceiverSH::IsEventName ( jsval  id) [inline, static, protected, inherited]

Definition at line 449 of file nsDOMClassInfo.h.

  {
    NS_ASSERTION(JSVAL_IS_STRING(id), "Don't pass non-string jsval's here!");

    jschar *str = ::JS_GetStringChars(JSVAL_TO_STRING(id));

    if (str[0] == 'o' && str[1] == 'n') {
      return ReallyIsEventName(id, str[2]);
    }

    return PR_FALSE;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool nsDOMClassInfo::IsReadonlyReplaceable ( jsval  id) [inline, static, protected, inherited]

Definition at line 275 of file nsDOMClassInfo.h.

  {
    return (id == sTop_id          ||
            id == sParent_id       ||
            id == sScrollbars_id   ||
            id == sContent_id      ||
            id == sMenubar_id      ||
            id == sToolbar_id      ||
            id == sLocationbar_id  ||
            id == sPersonalbar_id  ||
            id == sStatusbar_id    ||
            id == sDirectories_id  ||
            id == sControllers_id  ||
            id == sScrollX_id      ||
            id == sScrollY_id      ||
            id == sScrollMaxX_id   ||
            id == sScrollMaxY_id   ||
            id == sLength_id       ||
            id == sFrames_id       ||
            id == sSelf_id);
  }

Here is the caller graph for this function:

static PRBool nsDOMClassInfo::IsWritableReplaceable ( jsval  id) [inline, static, protected, inherited]

Definition at line 297 of file nsDOMClassInfo.h.

  {
    return (id == sInnerHeight_id  ||
            id == sInnerWidth_id   ||
            id == sOpener_id       ||
            id == sOuterHeight_id  ||
            id == sOuterWidth_id   ||
            id == sScreenX_id      ||
            id == sScreenY_id      ||
            id == sStatus_id       ||
            id == sName_id);
  }

Here is the caller graph for this function:

PRUint32 nsIXPCScriptable::mark ( in nsIXPConnectWrappedNative  wrapper,
in JSContextPtr  cx,
in JSObjectPtr  obj,
in voidPtr  arg 
) [inherited]
NS_IMETHODIMP nsDOMGCParticipantSH::Mark ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
void arg,
PRUint32 _retval 
) [inherited]

Definition at line 7011 of file nsDOMClassInfo.cpp.

{
  nsCOMPtr<nsIDOMGCParticipant> participant(do_QueryWrappedNative(wrapper));

  nsDOMClassInfo::MarkReachablePreservedWrappers(participant, cx, arg);

  *_retval = 1;
  return NS_OK;
}

Here is the call graph for this function:

void nsDOMClassInfo::MarkReachablePreservedWrappers ( nsIDOMGCParticipant aParticipant,
JSContext cx,
void arg 
) [static, inherited]

Mark all preserved wrappers reachable from |aDOMNode| via DOM APIs.

Definition at line 5173 of file nsDOMClassInfo.cpp.

{
  // Magic value indicating we've hit out-of-memory earlier in this GC.
  if (sWrapperSCCTable.ops == WRAPPER_SCC_OPS_OOM_MARKER)
    return;

  // The JS engine doesn't have a notification for the beginning of
  // the mark phase.  However, we can determine that the mark phase
  // has begun by detecting the first mark and lazily call
  // BeginGCMark.
  if (!sWrapperSCCTable.ops && !nsDOMClassInfo::BeginGCMark(cx)) {
    // We didn't have enough memory to create the temporary data
    // structures we needed.
    sWrapperSCCTable.ops = WRAPPER_SCC_OPS_OOM_MARKER;

    // Just mark all the preserved wrappers.  It won't help the GC free
    // up memory, but there's nothing better to do.
    if (sPreservedWrapperTable.ops) {
      MarkAllWrappersData data;
      data.cx = cx;
      data.arg = arg;
      PL_DHashTableEnumerate(&sPreservedWrapperTable, MarkAllWrappers, &data);
    }
    return;
  }

  nsIDOMGCParticipant *SCCIndex = aParticipant->GetSCCIndex();
  WrapperSCCEntry *entry = NS_STATIC_CAST(WrapperSCCEntry*,
    PL_DHashTableOperate(&sWrapperSCCTable, SCCIndex, PL_DHASH_LOOKUP));
  if (!PL_DHASH_ENTRY_IS_BUSY(entry) || entry->marked)
    return;

#ifdef DEBUG_PRESERVE_WRAPPERS
  {
    nsAutoString nodeName;
    nsCOMPtr<nsIDOMNode> node = do_QueryInterface(entry->key);
    if (node)
      node->GetNodeName(nodeName);
    else
      nodeName.AssignLiteral("##not-node##");
    printf("  marking entries for SCC root %p \"%s\"\n",
           NS_STATIC_CAST(void*, entry->key.get()),
           NS_ConvertUTF16toUTF8(nodeName).get());
  }
#endif
  entry->marked = PR_TRUE;

  // Do the reachable list first to encourage shorter call stacks
  // (perhaps slightly less recursion through JS marking).
  nsCOMArray<nsIDOMGCParticipant> reachable;
  SCCIndex->AppendReachableList(reachable);
  for (PRInt32 i = 0, i_end = reachable.Count(); i < i_end; ++i) {
    if (reachable[i])
      MarkReachablePreservedWrappers(reachable[i], cx, arg);
  }

  for (PreservedWrapperEntry *pwe = entry->first; pwe; pwe = pwe->next) {
    nsIXPConnectJSObjectHolder *wrapper;
    JSObject *wrapper_obj;
    if ((wrapper = pwe->keyToWrapperFunc(pwe->key)) &&
        NS_SUCCEEDED(wrapper->GetJSObject(&wrapper_obj)))
      ::JS_MarkGCThing(cx, wrapper_obj,
                       "nsDOMClassInfo::sPreservedWrapperTable", arg);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsIXPCScriptable::newEnumerate ( in nsIXPConnectWrappedNative  wrapper,
in JSContextPtr  cx,
in JSObjectPtr  obj,
in PRUint32  enum_op,
in JSValPtr  statep,
out JSID  idp 
) [inherited]
NS_IMETHODIMP nsWindowSH::NewEnumerate ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
PRUint32  enum_op,
jsval statep,
jsid idp,
PRBool _retval 
)

Definition at line 6309 of file nsDOMClassInfo.cpp.

{
  switch (enum_op) {
    case JSENUMERATE_INIT:
    {
      // First, do the security check that nsDOMClassInfo does to see
      // if we need to do any work at all.
      nsDOMClassInfo::Enumerate(wrapper, cx, obj, _retval);
      if (!*_retval) {
        return NS_OK;
      }

      // The security check passed, let's see if we need to get the inner
      // window's JS object or if we can just start enumerating.
      nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);
      JSObject *enumobj = win->GetGlobalJSObject();
      if (win->IsOuterWindow()) {
        nsGlobalWindow *inner = win->GetCurrentInnerWindowInternal();
        if (inner) {
          enumobj = inner->GetGlobalJSObject();
        }
      }

      // Great, we have the js object, now let's enumerate it.
      JSObject *iterator = JS_NewPropertyIterator(cx, enumobj);
      if (!iterator) {
        return NS_ERROR_OUT_OF_MEMORY;
      }

      *statep = OBJECT_TO_JSVAL(iterator);
      if (idp) {
        // Note: With these property iterators, we can't tell ahead of time how
        // many properties we're going to be iterating over.
        *idp = JSVAL_ZERO;
      }
      break;
    }
    case JSENUMERATE_NEXT:
    {
      JSObject *iterator = (JSObject*)JSVAL_TO_OBJECT(*statep);
      if (!JS_NextProperty(cx, iterator, idp)) {
        return NS_ERROR_UNEXPECTED;
      }

      if (*idp != JSVAL_VOID) {
        break;
      }

      // Fall through.
    }
    case JSENUMERATE_DESTROY:
      // Let GC at our iterator object.
      *statep = JSVAL_NULL;
      break;

    default:
      NS_NOTREACHED("Bad call from the JS engine");
      return NS_ERROR_FAILURE;
  }

  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP nsWindowSH::NewResolve ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
PRUint32  flags,
JSObject **  objp,
PRBool _retval 
)

Reimplemented from nsEventReceiverSH.

Definition at line 5827 of file nsDOMClassInfo.cpp.

{
  nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);

#ifdef DEBUG_SH_FORWARDING
  {
    nsDependentJSString str(::JS_ValueToString(cx, id));

    if (win->IsInnerWindow()) {
#ifdef DEBUG_PRINT_INNER
      printf("Property '%s' resolve on inner window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
#endif
    } else {
      printf("Property '%s' resolve on outer window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
    }
  }
#endif

  // Note, we won't forward resolve of the location property to the
  // inner window, we need to deal with that one for the outer too
  // since we've got special security protection code for that
  // property.  Also note that we want to enter this block even for
  // native wrappers, so that we'll ensure an inner window to wrap
  // against for the result of whatever we're getting.
  if (win->IsOuterWindow() && id != sLocation_id) {
    // XXXjst: Do security checks here when we remove the security
    // checks on the inner window.

    nsGlobalWindow *innerWin = win->GetCurrentInnerWindowInternal();

    if ((!innerWin || !innerWin->GetExtantDocument()) &&
        !win->IsCreatingInnerWindow()) {
      // We're resolving a property on an outer window for which there
      // is no inner window yet, and we're not in the midst of
      // creating the inner window or in the middle of initializing
      // XPConnect classes on it. If the context is already
      // initialized, force creation of a new inner window. This will
      // create a synthetic about:blank document, and an inner window
      // which may be reused by the actual document being loaded into
      // this outer window. This way properties defined on the window
      // before the document load started will be visible to the
      // document once it's loaded, assuming same origin etc.
      nsIScriptContext *scx = win->GetContextInternal();

      if (scx && scx->IsContextInitialized()) {
        nsCOMPtr<nsIDOMDocument> doc;
        win->GetDocument(getter_AddRefs(doc));

        // Grab the new inner window.
        innerWin = win->GetCurrentInnerWindowInternal();

        if (!innerWin) {
          return NS_ERROR_OUT_OF_MEMORY;
        }
      }
    }

    JSObject *innerObj;
    if (!ObjectIsNativeWrapper(cx, obj) &&
        innerWin && (innerObj = innerWin->GetGlobalJSObject())) {
#ifdef DEBUG_SH_FORWARDING
      printf(" --- Forwarding resolve to inner window %p\n", (void *)innerWin);
#endif

      jsid interned_id;
      JSObject *pobj;
      JSProperty *prop = nsnull;

      *_retval = (::JS_ValueToId(cx, id, &interned_id) &&
                  OBJ_LOOKUP_PROPERTY(cx, innerObj, interned_id, &pobj,
                                      &prop));

      if (*_retval && prop) {
#ifdef DEBUG_SH_FORWARDING
        printf(" --- Resolve on inner window found property.\n");
#endif

        OBJ_DROP_PROPERTY(cx, pobj, prop);

        *objp = pobj;
      }

      return NS_OK;
    }
  }

  if (!JSVAL_IS_STRING(id)) {
    if (JSVAL_IS_INT(id) && !(flags & JSRESOLVE_ASSIGNING)) {
      // If we're resolving a numeric property, treat that as if
      // window.frames[n] is resolved (since window.frames ===
      // window), if window.frames[n] is a child frame, define a
      // property for this index.

      nsCOMPtr<nsIDOMWindow> frame = GetChildFrame(win, id);

      if (frame) {
        // A numeric property accessed and the numeric property is a
        // child frame. Define a property for this index.

        PRBool doSecurityCheckInAddProperty = sDoSecurityCheckInAddProperty;
        sDoSecurityCheckInAddProperty = PR_FALSE;

        *_retval = ::JS_DefineElement(cx, obj, JSVAL_TO_INT(id), JSVAL_VOID,
                                      nsnull, nsnull, 0);

        sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;

        if (*_retval) {
          *objp = obj;
        }
      }
    }

    return NS_OK;
  }

  nsIScriptContext *my_context = win->GetContextInternal();

  nsresult rv = NS_OK;

  // Resolve standard classes on my_context's JSContext (or on cx,
  // if we don't have a my_context yet), in case the two contexts
  // have different origins.  We want lazy standard class
  // initialization to behave as if it were done eagerly, on each
  // window's own context (not on some other window-caller's
  // context).

  JSContext *my_cx;

  if (!my_context) {
    my_cx = cx;
  } else {
    my_cx = (JSContext *)my_context->GetNativeContext();
  }

  // Resolving a standard class won't do any evil, and it's possible
  // for caps to get the answer wrong, so disable the security check
  // for this case.

  JSBool did_resolve = JS_FALSE;
  PRBool doSecurityCheckInAddProperty = sDoSecurityCheckInAddProperty;
  sDoSecurityCheckInAddProperty = PR_FALSE;

  // Don't resolve standard classes on XPCNativeWrapper.
  JSBool ok = !ObjectIsNativeWrapper(cx, obj) ?
              ::JS_ResolveStandardClass(my_cx, obj, id, &did_resolve) :
              JS_TRUE;

  sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;

  if (!ok) {
    // Trust the JS engine (or the script security manager) to set
    // the exception in the JS engine.

    jsval exn;
    if (!JS_GetPendingException(my_cx, &exn)) {
      return NS_ERROR_UNEXPECTED;
    }

    // Return NS_OK to avoid stomping over the exception that was passed
    // down from the ResolveStandardClass call.
    // Note that the order of the JS_ClearPendingException and
    // JS_SetPendingException is important in the case that my_cx == cx.

    JS_ClearPendingException(my_cx);
    JS_SetPendingException(cx, exn);
    *_retval = JS_FALSE;
    return NS_OK;
  }

  if (did_resolve) {
    *objp = obj;

    return NS_OK;
  }

  if (!(flags & JSRESOLVE_ASSIGNING)) {
    // We want this code to be before the child frame lookup code
    // below so that a child frame named 'constructor' doesn't
    // shadow the window's constructor property.
    if (id == sConstructor_id) {
      return ResolveConstructor(cx, obj, objp);
    }
  }

  if (!my_context || !my_context->IsContextInitialized()) {
    // The context is not yet initialized so there's nothing we can do
    // here yet.

    return NS_OK;
  }


  // Hmm, we do an awful lot of QIs here; maybe we should add a
  // method on an interface that would let us just call into the
  // window code directly...

  JSString *str = JSVAL_TO_STRING(id);

  // Don't resolve named iframes on native wrappers
  if (!ObjectIsNativeWrapper(cx, obj)) {
    nsCOMPtr<nsIDocShellTreeNode> dsn(do_QueryInterface(win->GetDocShell()));

    PRInt32 count = 0;

    if (dsn) {
      dsn->GetChildCount(&count);
    }

    if (count > 0) {
      nsCOMPtr<nsIDocShellTreeItem> child;

      const jschar *chars = ::JS_GetStringChars(str);

      dsn->FindChildWithName(NS_REINTERPRET_CAST(const PRUnichar*, chars),
                             PR_FALSE, PR_TRUE, nsnull, nsnull,
                             getter_AddRefs(child));

      nsCOMPtr<nsIDOMWindow> child_win(do_GetInterface(child));

      if (child_win) {
        // We found a subframe of the right name, define the property
        // on the wrapper so that ::NewResolve() doesn't get called
        // again for this property name.

        JSObject *wrapperObj;
        wrapper->GetJSObject(&wrapperObj);

        jsval v;
        nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
        rv = WrapNative(cx, wrapperObj, child_win,
                        NS_GET_IID(nsIDOMWindowInternal), &v,
                        getter_AddRefs(holder));
        NS_ENSURE_SUCCESS(rv, rv);

        // Script is accessing a child frame and this access can
        // potentially come from a context from a different domain.
        // ::JS_DefineUCProperty() will call
        // nsWindowSH::AddProperty(), and that method will do a
        // security check and that security check will fail since
        // other domains can't add properties to a global object in
        // this domain. Set the sDoSecurityCheckInAddProperty flag to
        // false (and set it to true immediagtely when we're done) to
        // tell nsWindowSH::AddProperty() that defining this new
        // property is 'ok' in this case, even if the call comes from
        // a different context.

        sDoSecurityCheckInAddProperty = PR_FALSE;

        PRBool ok = ::JS_DefineUCProperty(cx, obj, chars,
                                          ::JS_GetStringLength(str), v, nsnull,
                                          nsnull, 0);

        sDoSecurityCheckInAddProperty = PR_TRUE;

        if (!ok) {
          return NS_ERROR_FAILURE;
        }

        *objp = obj;

        return NS_OK;
      }
    }
  }

  // It is not worth calling GlobalResolve() if we are resolving
  // for assignment, since only read-write properties get dealt
  // with there.
  if (!(flags & JSRESOLVE_ASSIGNING)) {
    // Call GlobalResolve() after we call FindChildWithName() so
    // that named child frames will override external properties
    // which have been registered with the script namespace manager.

    JSBool did_resolve = JS_FALSE;
    rv = GlobalResolve(win, cx, obj, str, flags, &did_resolve);
    NS_ENSURE_SUCCESS(rv, rv);

    if (did_resolve) {
      // GlobalResolve() resolved something, so we're done here.
      *objp = obj;

      return NS_OK;
    }
  }

  if (id == s_content_id) {
    // Map window._content to window.content for backwards
    // compatibility, this should spit out an message on the JS
    // console.

    JSObject *windowObj = win->GetGlobalJSObject();

    JSFunction *fun = ::JS_NewFunction(cx, ContentWindowGetter, 0, 0,
                                       windowObj, "_content");
    if (!fun) {
      return NS_ERROR_OUT_OF_MEMORY;
    }

    JSObject *funObj = ::JS_GetFunctionObject(fun);

    nsAutoGCRoot root(&funObj, &rv);
    NS_ENSURE_SUCCESS(rv, rv);

    if (!::JS_DefineUCProperty(cx, windowObj, ::JS_GetStringChars(str),
                               ::JS_GetStringLength(str), JSVAL_VOID,
                               (JSPropertyOp)funObj, nsnull,
                               JSPROP_ENUMERATE | JSPROP_GETTER |
                               JSPROP_SHARED)) {
      return NS_ERROR_FAILURE;
    }

    *objp = obj;

    return NS_OK;
  }

  if (id == sLocation_id) {
    // This must be done even if we're just getting the value of
    // window.location (i.e. no checking flags & JSRESOLVE_ASSIGNING
    // here) since we must define window.location to prevent the
    // getter from being overriden (for security reasons).

    nsCOMPtr<nsIDOMLocation> location;
    rv = win->GetLocation(getter_AddRefs(location));
    NS_ENSURE_SUCCESS(rv, rv);

    // Make sure we wrap the location object in the inner window's
    // scope if we've got an inner window.
    JSObject *scope = nsnull;
    if (win->IsOuterWindow()) {
      nsGlobalWindow *innerWin = win->GetCurrentInnerWindowInternal();

      if (innerWin) {
        scope = innerWin->GetGlobalJSObject();
      }
    }

    if (!scope) {
      wrapper->GetJSObject(&scope);
    }

    jsval v;
    nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
    rv = WrapNative(cx, scope, location, NS_GET_IID(nsIDOMLocation), &v,
                    getter_AddRefs(holder));
    NS_ENSURE_SUCCESS(rv, rv);

    PRBool doSecurityCheckInAddProperty = sDoSecurityCheckInAddProperty;
    sDoSecurityCheckInAddProperty = PR_FALSE;

    JSBool ok = ::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
                                      ::JS_GetStringLength(str), v, nsnull,
                                      nsnull, JSPROP_ENUMERATE);

    sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;

    if (!ok) {
      return NS_ERROR_FAILURE;
    }

    *objp = obj;

    return NS_OK;
  }

  if (flags & JSRESOLVE_ASSIGNING) {
    if (IsReadonlyReplaceable(id) ||
        (!(flags & JSRESOLVE_QUALIFIED) && IsWritableReplaceable(id))) {
      // A readonly "replaceable" property is being set, or a
      // readwrite "replaceable" property is being set w/o being
      // fully qualified. Define the property on obj with the value
      // undefined to override the predefined property. This is done
      // for compatibility with other browsers.

      if (!::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
                                 ::JS_GetStringLength(str),
                                 JSVAL_VOID, nsnull, nsnull,
                                 JSPROP_ENUMERATE)) {
        return NS_ERROR_FAILURE;
      }

      *objp = obj;

      return NS_OK;
    }
  } else {
    if (id == sNavigator_id) {
      nsCOMPtr<nsIDOMNavigator> navigator;
      rv = win->GetNavigator(getter_AddRefs(navigator));
      NS_ENSURE_SUCCESS(rv, rv);

      jsval v;
      nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
      rv = WrapNative(cx, obj, navigator, NS_GET_IID(nsIDOMNavigator), &v,
                      getter_AddRefs(holder));
      NS_ENSURE_SUCCESS(rv, rv);

      if (!::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
                                 ::JS_GetStringLength(str), v, nsnull,
                                 nsnull, JSPROP_ENUMERATE)) {
        return NS_ERROR_FAILURE;
      }

      *objp = obj;

      return NS_OK;
    }

    if (id == sDocument_id) {
      nsCOMPtr<nsIDOMDocument> document;
      rv = win->GetDocument(getter_AddRefs(document));
      NS_ENSURE_SUCCESS(rv, rv);

      jsval v;
      nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
      rv = WrapNative(cx, obj, document, NS_GET_IID(nsIDOMDocument), &v,
                      getter_AddRefs(holder));
      NS_ENSURE_SUCCESS(rv, rv);

      // The PostCreate hook for the document will handle defining the
      // property
      *objp = obj;

      return NS_OK;
    }

    if (id == sWindow_id) {
      // window should *always* be the outer window object.
      win = win->GetOuterWindowInternal();
      NS_ENSURE_TRUE(win, NS_ERROR_NOT_AVAILABLE);

      PRBool doSecurityCheckInAddProperty = sDoSecurityCheckInAddProperty;
      sDoSecurityCheckInAddProperty = PR_FALSE;

      PRBool ok =
        ::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
                              ::JS_GetStringLength(str),
                              OBJECT_TO_JSVAL(win->GetGlobalJSObject()),
                              nsnull, nsnull,
                              JSPROP_READONLY | JSPROP_ENUMERATE);

      sDoSecurityCheckInAddProperty = doSecurityCheckInAddProperty;

      if (!ok) {
        return NS_ERROR_FAILURE;
      }

      *objp = obj;

      return NS_OK;
    }

    // Do a security check when resolving heretofore unknown string
    // properties on window objects to prevent detection of a
    // property's existence across origins. We only do this when
    // resolving for a GET, no need to do it for set since we'll do
    // a security check in nsWindowSH::SetProperty() in that case.
    rv =
      doCheckPropertyAccess(cx, obj, id, wrapper,
                            nsIXPCSecurityManager::ACCESS_GET_PROPERTY,
                            PR_TRUE);
    if (NS_FAILED(rv)) {
      // Security check failed. The security manager set a JS
      // exception, we must make sure that exception is propagated, so
      // return NS_OK here.

      *_retval = PR_FALSE;

      return NS_OK;
    }
  }

  return nsEventReceiverSH::NewResolve(wrapper, cx, obj, id, flags, objp,
                                       _retval);
}

Here is the call graph for this function:

static PRBool nsDOMClassInfo::ObjectIsNativeWrapper ( JSContext cx,
JSObject obj 
) [inline, static, inherited]

Definition at line 161 of file nsDOMClassInfo.h.

  {
#ifdef DEBUG
    {
      nsIScriptContext *scx = GetScriptContextFromJSContext(cx);

      NS_PRECONDITION(!scx || !scx->IsContextInitialized() ||
                      sXPCNativeWrapperClass,
                      "Must know what the XPCNativeWrapper class is!");
    }
#endif

    return sXPCNativeWrapperClass &&
      ::JS_GetClass(cx, obj) == sXPCNativeWrapperClass;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 6424 of file nsDOMClassInfo.cpp.

{
  nsGlobalWindow *win =
    nsGlobalWindow::FromWrapper(wrapper)->GetOuterWindowInternal();

  if (!win) {
    // If we no longer have an outer window. No code should ever be
    // running on a window w/o an outer, which means this hook should
    // never be called when we have no outer. But just in case, return
    // null to prevent leaking an inner window to code in a different
    // window.

    *_retval = nsnull;

    return NS_ERROR_UNEXPECTED;
  }

  // Return the outer window.

  *_retval = win->GetGlobalJSObject();

  return NS_OK;
}

Here is the call graph for this function:

void nsIXPCScriptable::preCreate ( in nsISupports  nativeObj,
in JSContextPtr  cx,
in JSObjectPtr  globalObj,
out JSObjectPtr  parentObj 
) [inherited]
NS_IMETHODIMP nsWindowSH::PreCreate ( nsISupports *  nativeObj,
JSContext cx,
JSObject globalObj,
JSObject **  parentObj 
)

Definition at line 3825 of file nsDOMClassInfo.cpp.

{
  // Since this is one of the first calls we'll get from XPConnect,
  // grab the pointer to the Object class so we'll have it later on.

  if (!sObjectClass) {
    JSObject *obj, *proto = globalObj;

    do {
      obj = proto;
      proto = ::JS_GetPrototype(cx, obj);
    } while (proto);

    sObjectClass = JS_GET_CLASS(cx, obj);
  }

  // Normally ::PreCreate() is used to give XPConnect the parent
  // object for the object that's being wrapped, this parent object is
  // set as the parent of the wrapper and it's also used to find the
  // right scope for the object being wrapped. Now, in the case of the
  // global object the wrapper shouldn't have a parent but we supply
  // one here anyway (the global object itself) and this will be used
  // by XPConnect only to find the right scope, once the scope is
  // found XPConnect will find the existing wrapper (which always
  // exists since it's created on window construction), since an
  // existing wrapper is found the parent we supply here is ignored
  // after the wrapper is found.

  nsCOMPtr<nsIScriptGlobalObject> sgo(do_QueryInterface(nativeObj));
  NS_WARN_IF_FALSE(sgo, "nativeObj not a global object!");

  if (sgo) {
    *parentObj = sgo->GetGlobalJSObject();

    if (*parentObj) {
      return NS_OK;
    }
  }

  // We're most likely being called when the global object is
  // created, at that point we won't get a nsIScriptContext but we
  // know we're called on the correct context so we return globalObj

  *parentObj = globalObj;

  return NS_OK;
}

Here is the call graph for this function:

nsresult nsDOMClassInfo::PreserveNodeWrapper ( nsIXPConnectWrappedNative aWrapper,
PRBool  aRootWhenExternallyReferenced = PR_FALSE 
) [static, inherited]

Easier way to call the above just for DOM nodes (and better, since we get the performance benefits of having the same identity function).

The call to |PreserveWrapper| is made with |aKey| == |aWrapper|.

The caller need not call |ReleaseWrapper| since the node's wrapper's scriptable helper does so in its finalize callback.

Definition at line 5118 of file nsDOMClassInfo.cpp.

{
  nsCOMPtr<nsIDOMGCParticipant> participant =
    do_QueryInterface(aWrapper->Native());
  if (!participant)
    // nsJSContext::PreserveWrapper needs us to null-check
    return NS_OK;

  return nsDOMClassInfo::PreserveWrapper(aWrapper, IdentityKeyToWrapperFunc,
                                         participant,
                                         aRootWhenExternallyReferenced);
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsDOMClassInfo::PreserveWrapper ( void aKey,
nsIXPConnectJSObjectHolder *(*)(void *aKey)  aKeyToWrapperFunc,
nsIDOMGCParticipant aParticipant,
PRBool  aRootWhenExternallyReferenced 
) [static, inherited]

Note that the XPConnect wrapper should be protected from garbage collection as long as the GC participant is reachable.

A preservation with a given key overwrites any previous preservation with that key.

No strong references are held as a result of this function call, so the caller is responsible for calling |ReleaseWrapper| sometime before |aParticipant|'s destructor runs.

aRootWhenExternallyReferenced should be true if the preservation is for an event handler that could be triggered by the participant being externally referenced by a network load.

Definition at line 5049 of file nsDOMClassInfo.cpp.

{
  NS_PRECONDITION(aKey, "unexpected null pointer");
  NS_PRECONDITION(aKeyToWrapperFunc, "unexpected null pointer");
  NS_PRECONDITION(aParticipant, "unexpected null pointer");
  NS_ASSERTION(!sWrapperSCCTable.ops,
               "cannot change preserved wrapper table during mark phase");

  if (!sPreservedWrapperTable.ops &&
      !PL_DHashTableInit(&sPreservedWrapperTable, &sPreservedWrapperTableOps,
                         nsnull, sizeof(PreservedWrapperEntry), 16)) {
    sPreservedWrapperTable.ops = nsnull;
    return NS_ERROR_OUT_OF_MEMORY;
  }

  PreservedWrapperEntry *entry = NS_STATIC_CAST(PreservedWrapperEntry*,
    PL_DHashTableOperate(&sPreservedWrapperTable, aKey, PL_DHASH_ADD));
  if (!entry)
    return NS_ERROR_OUT_OF_MEMORY;
  NS_ASSERTION(!entry->key ||
               (entry->key == aKey &&
                entry->keyToWrapperFunc == aKeyToWrapperFunc &&
                entry->participant == aParticipant),
               "preservation key already used");

  PRBool wasExternallyReferenced = entry->rootWhenExternallyReferenced;
  entry->key = aKey;
  entry->keyToWrapperFunc = aKeyToWrapperFunc;
  entry->participant = aParticipant;
  entry->rootWhenExternallyReferenced =
    aRootWhenExternallyReferenced || wasExternallyReferenced;

  if (aRootWhenExternallyReferenced && !wasExternallyReferenced) {
    if (!sRootWhenExternallyReferencedTable.ops &&
        !PL_DHashTableInit(&sRootWhenExternallyReferencedTable,
                           PL_DHashGetStubOps(), nsnull,
                           sizeof(RootWhenExternallyReferencedEntry), 16)) {
      PL_DHashTableRawRemove(&sPreservedWrapperTable, entry);
      return NS_ERROR_OUT_OF_MEMORY;
    }

    RootWhenExternallyReferencedEntry *rwerEntry =
      NS_STATIC_CAST(RootWhenExternallyReferencedEntry*,
        PL_DHashTableOperate(&sRootWhenExternallyReferencedTable,
                             aParticipant, PL_DHASH_ADD));
    if (!rwerEntry) {
      PL_DHashTableRawRemove(&sPreservedWrapperTable, entry);
      return NS_ERROR_OUT_OF_MEMORY;
    }
    NS_ASSERTION(rwerEntry->refcnt == 0 ||
                 rwerEntry->participant == aParticipant,
                 "entry mismatch");
    rwerEntry->participant = aParticipant;
    ++rwerEntry->refcnt;
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsEventReceiverSH::ReallyIsEventName ( jsval  id,
jschar  aFirstChar 
) [static, protected, inherited]

Definition at line 6702 of file nsDOMClassInfo.cpp.

{
  // I wonder if this is faster than using a hash...

  switch (aFirstChar) {
  case 'a' :
    return id == sOnabort_id;
  case 'b' :
    return (id == sOnbeforeunload_id ||
            id == sOnblur_id);
  case 'e' :
    return id == sOnerror_id;
  case 'f' :
    return id == sOnfocus_id;
  case 'c' :
    return (id == sOnchange_id       ||
            id == sOnclick_id        ||
            id == sOncontextmenu_id);
  case 'd' :
    return id == sOndblclick_id;
  case 'l' :
    return id == sOnload_id;
  case 'p' :
    return (id == sOnpaint_id        ||
            id == sOnpageshow_id     ||
            id == sOnpagehide_id);
  case 'k' :
    return (id == sOnkeydown_id      ||
            id == sOnkeypress_id     ||
            id == sOnkeyup_id);
  case 'u' :
    return id == sOnunload_id;
  case 'm' :
    return (id == sOnmousemove_id    ||
            id == sOnmouseout_id     ||
            id == sOnmouseover_id    ||
            id == sOnmouseup_id      ||
            id == sOnmousedown_id);
  case 'r' :
    return (id == sOnreset_id        ||
            id == sOnresize_id);
  case 's' :
    return (id == sOnscroll_id       ||
            id == sOnselect_id       ||
            id == sOnsubmit_id);
  }

  return PR_FALSE;
}

Here is the caller graph for this function:

nsresult nsDOMClassInfo::RegisterClassName ( PRInt32  aDOMClassInfoID) [static, protected, inherited]

Definition at line 1521 of file nsDOMClassInfo.cpp.

{
  extern nsScriptNameSpaceManager *gNameSpaceManager;
  NS_ENSURE_TRUE(gNameSpaceManager, NS_ERROR_NOT_INITIALIZED);

  gNameSpaceManager->RegisterClassName(sClassInfoData[aClassInfoID].mName,
                                       aClassInfoID);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsDOMClassInfo::RegisterClassProtos ( PRInt32  aDOMClassInfoID) [static, protected, inherited]

Definition at line 1534 of file nsDOMClassInfo.cpp.

{
  extern nsScriptNameSpaceManager *gNameSpaceManager;
  NS_ENSURE_TRUE(gNameSpaceManager, NS_ERROR_NOT_INITIALIZED);
  PRBool found_old;

  const nsIID *primary_iid = sClassInfoData[aClassInfoID].mProtoChainInterface;

  if (!primary_iid || primary_iid == &NS_GET_IID(nsISupports)) {
    return NS_OK;
  }

  nsCOMPtr<nsIInterfaceInfoManager> iim =
    dont_AddRef(XPTI_GetInterfaceInfoManager());
  NS_ENSURE_TRUE(iim, NS_ERROR_NOT_AVAILABLE);

  nsCOMPtr<nsIInterfaceInfo> if_info;
  PRBool first = PR_TRUE;

  iim->GetInfoForIID(primary_iid, getter_AddRefs(if_info));

  while (if_info) {
    nsIID *iid = nsnull;

    if_info->GetInterfaceIID(&iid);
    NS_ENSURE_TRUE(iid, NS_ERROR_UNEXPECTED);

    if (iid->Equals(NS_GET_IID(nsISupports))) {
      nsMemory::Free(iid);

      break;
    }

    nsXPIDLCString name;
    if_info->GetName(getter_Copies(name));

    gNameSpaceManager->RegisterClassProto(CutPrefix(name), iid, &found_old);

    nsMemory::Free(iid);

    if (first) {
      first = PR_FALSE;
    } else if (found_old) {
      break;
    }

    nsCOMPtr<nsIInterfaceInfo> tmp(if_info);
    tmp->GetParent(getter_AddRefs(if_info));
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsEventReceiverSH::RegisterCompileHandler ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
PRBool  compile,
PRBool  remove,
PRBool did_define 
) [protected, inherited]

Definition at line 6882 of file nsDOMClassInfo.cpp.

{
  NS_PRECONDITION(!compile || !remove,
                  "Can't both compile and remove at the same time");
  *did_define = PR_FALSE;

  if (!IsEventName(id)) {
    return NS_OK;
  }

  if (ObjectIsNativeWrapper(cx, obj)) {
    return NS_ERROR_NOT_AVAILABLE;
  }

  nsIScriptContext *script_cx = nsJSUtils::GetStaticScriptContext(cx, obj);
  NS_ENSURE_TRUE(script_cx, NS_ERROR_UNEXPECTED);

  nsCOMPtr<nsIDOMEventReceiver> receiver(do_QueryWrappedNative(wrapper));
  NS_ENSURE_TRUE(receiver, NS_ERROR_UNEXPECTED);

  nsCOMPtr<nsIEventListenerManager> manager;
  receiver->GetListenerManager(getter_AddRefs(manager));
  NS_ENSURE_TRUE(manager, NS_ERROR_UNEXPECTED);

  nsCOMPtr<nsIAtom> atom(do_GetAtom(nsDependentJSString(id)));
  NS_ENSURE_TRUE(atom, NS_ERROR_OUT_OF_MEMORY);

  nsresult rv;

  JSObject *scope = GetGlobalJSObject(cx, obj);

  if (compile) {
    rv = manager->CompileScriptEventListener(script_cx, scope, receiver, atom,
                                             did_define);
  } else if (remove) {
    rv = manager->RemoveScriptEventListener(atom);
  } else {
    rv = manager->RegisterScriptEventListener(script_cx, scope, receiver,
                                              atom);
  }

  return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsDOMClassInfo::RegisterExternalClasses ( ) [static, protected, inherited]

Definition at line 1589 of file nsDOMClassInfo.cpp.

{
  extern nsScriptNameSpaceManager *gNameSpaceManager;
  NS_ENSURE_TRUE(gNameSpaceManager, NS_ERROR_NOT_INITIALIZED);

  nsresult rv;
  nsCOMPtr<nsIComponentRegistrar> registrar;
  rv = NS_GetComponentRegistrar(getter_AddRefs(registrar));
  NS_ENSURE_SUCCESS(rv, rv);

  nsCOMPtr<nsICategoryManager> cm =
    do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
  NS_ENSURE_SUCCESS(rv, rv);

  nsCOMPtr<nsISimpleEnumerator> e;
  rv = cm->EnumerateCategory(JAVASCRIPT_DOM_CLASS, getter_AddRefs(e));
  NS_ENSURE_SUCCESS(rv, rv);

  nsXPIDLCString contractId;
  nsCAutoString categoryEntry;
  nsCOMPtr<nsISupports> entry;

  while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) {
    nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));

    if (!category) {
      NS_WARNING("Category entry not an nsISupportsCString!");
      continue;
    }

    rv = category->GetData(categoryEntry);

    cm->GetCategoryEntry(JAVASCRIPT_DOM_CLASS, categoryEntry.get(),
                         getter_Copies(contractId));
    NS_ENSURE_SUCCESS(rv, rv);

    nsCID *cid;
    rv = registrar->ContractIDToCID(contractId, &cid);
    if (NS_FAILED(rv)) {
      NS_WARNING("Bad contract id registered with the script namespace manager");
      continue;
    }

    rv = gNameSpaceManager->RegisterExternalClassName(categoryEntry.get(), *cid);
    nsMemory::Free(cid);
    NS_ENSURE_SUCCESS(rv, rv);
  }

  return gNameSpaceManager->RegisterExternalInterfaces(PR_TRUE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsDOMClassInfo::ReleaseWrapper ( void aKey) [static, inherited]

Undoes the effects of any prior |PreserveWrapper| calls made with |aKey|.

Definition at line 5134 of file nsDOMClassInfo.cpp.

{
  NS_PRECONDITION(aKey, "unexpected null pointer");
  NS_ASSERTION(!sWrapperSCCTable.ops,
               "cannot change preserved wrapper table during mark phase");

  if (sPreservedWrapperTable.ops) {
    PL_DHashTableOperate(&sPreservedWrapperTable, aKey, PL_DHASH_REMOVE);
    if (sPreservedWrapperTable.entryCount == 0) {
      PL_DHashTableFinish(&sPreservedWrapperTable);
      sPreservedWrapperTable.ops = nsnull;
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsDOMClassInfo::ResolveConstructor ( JSContext cx,
JSObject obj,
JSObject **  objp 
) [protected, inherited]

Definition at line 3350 of file nsDOMClassInfo.cpp.

{
  JSObject *global = GetGlobalJSObject(cx, obj);

  jsval val;
  if (!::JS_GetProperty(cx, global, mData->mName, &val)) {
    return NS_ERROR_UNEXPECTED;
  }

  if (!JSVAL_IS_PRIMITIVE(val)) {
    // If val is not an (non-null) object there either is no
    // constructor for this class, or someone messed with
    // window.classname, just fall through and let the JS engine
    // return the Object constructor.

    JSString *str = JSVAL_TO_STRING(sConstructor_id);
    if (!::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
                               ::JS_GetStringLength(str), val, nsnull, nsnull,
                               JSPROP_ENUMERATE)) {
      return NS_ERROR_UNEXPECTED;
    }

    *objp = obj;
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 3916 of file nsDOMClassInfo.cpp.

{
  // Someone is accessing a element by referencing its name/id in the
  // global scope, do a security check to make sure that's ok.

  nsresult rv =
    sSecMan->CheckPropertyAccess(cx, GetGlobalJSObject(cx, obj), "Window", id,
                                 nsIXPCSecurityManager::ACCESS_SET_PROPERTY);

  // If !NS_SUCCEEDED(rv) the security check failed. The security
  // manager set a JS exception for us.
  return NS_SUCCEEDED(rv);
}

Here is the call graph for this function:

nsresult nsDOMClassInfo::SetExternallyReferenced ( nsIDOMGCParticipant aParticipant) [static, inherited]

Add/remove |aParticipant| from the table of externally referenced participants.

Does not maintain a count, so an object should not be added when it is already in the table.

The table of externally referenced participants is a list of participants that should be marked at GC-time if they are a participant in the preserved wrapper table added with aRootWhenExternallyReferenced, whether or not they are reachable from marked participants. This should be used for participants that hold onto scripts (typically onload or onerror handlers) that can be triggered at the end of a currently-ongoing operation (typically a network request) and that could thus expose the participant to script again in the future even though it is not otherwise reachable.

The caller is responsible for ensuring that the GC participant is alive while it is in this table; the table does not own a reference.

UnsetExternallyReferenced must be called exactly once for every successful SetExternallyReferenced call, and in no other cases.

Definition at line 5245 of file nsDOMClassInfo.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsWindowSH::SetProperty ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
jsval vp,
PRBool _retval 
)

Reimplemented from nsEventReceiverSH.

Definition at line 4226 of file nsDOMClassInfo.cpp.

{
  nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);

#ifdef DEBUG_SH_FORWARDING
  {
    nsDependentJSString str(::JS_ValueToString(cx, id));

    if (win->IsInnerWindow()) {
#ifdef DEBUG_PRINT_INNER
      printf("Property '%s' set on inner window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
#endif
    } else {
      printf("Property '%s' set on outer window %p\n",
             NS_ConvertUTF16toUTF8(str).get(), (void *)win);
    }
  }
#endif

  if (win->IsOuterWindow() && !ObjectIsNativeWrapper(cx, obj)) {
    // XXXjst: Do security checks here when we remove the security
    // checks on the inner window.

    nsGlobalWindow *innerWin = win->GetCurrentInnerWindowInternal();

    JSObject *innerObj;
    if (innerWin && (innerObj = innerWin->GetGlobalJSObject())) {
#ifdef DEBUG_SH_FORWARDING
      printf(" --- Forwarding set to inner window %p\n", (void *)innerWin);
#endif

      // Forward the set to the inner object
      if (JSVAL_IS_STRING(id)) {
        JSString *str = JSVAL_TO_STRING(id);

        *_retval = ::JS_SetUCProperty(cx, innerObj, ::JS_GetStringChars(str),
                                      ::JS_GetStringLength(str), vp);
      } else if (JSVAL_IS_INT(id)) {
        *_retval = ::JS_SetElement(cx, innerObj, JSVAL_TO_INT(id), vp);
      } else {
        NS_ERROR("Write me!");

        return NS_ERROR_NOT_IMPLEMENTED;
      }

      return NS_OK;
    }
  }

  if (needsSecurityCheck(cx, wrapper)) {
    nsresult rv =
      doCheckPropertyAccess(cx, obj, id, wrapper,
                            nsIXPCSecurityManager::ACCESS_SET_PROPERTY,
                            PR_TRUE);

    if (NS_FAILED(rv)) {
      // Security check failed. The security manager set a JS
      // exception, we must make sure that exception is propagated.

      *_retval = PR_FALSE;

      return NS_OK;
    }
  }

  if (id == sLocation_id) {
    JSString *val = ::JS_ValueToString(cx, *vp);
    NS_ENSURE_TRUE(val, NS_ERROR_UNEXPECTED);

    nsCOMPtr<nsIDOMWindowInternal> window(do_QueryWrappedNative(wrapper));
    NS_ENSURE_TRUE(window, NS_ERROR_UNEXPECTED);

    nsCOMPtr<nsIDOMLocation> location;
    nsresult rv = window->GetLocation(getter_AddRefs(location));
    NS_ENSURE_SUCCESS(rv, rv);

    nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
    rv = WrapNative(cx, obj, location, NS_GET_IID(nsIDOMLocation), vp,
                    getter_AddRefs(holder));
    NS_ENSURE_SUCCESS(rv, rv);

    rv = location->SetHref(nsDependentJSString(val));

    return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING;
  }

  return nsEventReceiverSH::SetProperty(wrapper, cx, obj, id, vp, _retval);
}

Here is the call graph for this function:

static void nsDOMClassInfo::SetXPCNativeWrapperClass ( JSClass aClass) [inline, static, inherited]

Set our JSClass pointer for the XPCNativeWrapper class.

Definition at line 155 of file nsDOMClassInfo.h.

                                                        {
    NS_ASSERTION(!sXPCNativeWrapperClass,
                 "Double set of sXPCNativeWrapperClass");
    sXPCNativeWrapperClass = aClass;
  }

Here is the caller graph for this function:

void nsDOMClassInfo::ShutDown ( ) [static, inherited]

Definition at line 3580 of file nsDOMClassInfo.cpp.

{
  NS_ASSERTION(sPreservedWrapperTable.ops == 0,
               "preserved wrapper table not empty at shutdown");
  NS_ASSERTION(sExternallyReferencedTable.ops == 0 ||
               sExternallyReferencedTable.entryCount == 0,
               "rooted participant table not empty at shutdown");
  NS_ASSERTION(sRootWhenExternallyReferencedTable.ops == 0,
               "root when externally referenced table not empty at shutdown");

  if (sExternallyReferencedTable.ops &&
      sExternallyReferencedTable.entryCount == 0) {
    PL_DHashTableFinish(&sExternallyReferencedTable);
    sExternallyReferencedTable.ops = nsnull;
  }

  if (sClassInfoData[0].u.mConstructorFptr) {
    PRUint32 i;

    for (i = 0; i < eDOMClassInfoIDCount; i++) {
      NS_IF_RELEASE(sClassInfoData[i].mCachedClassInfo);
    }
  }

  sTop_id             = JSVAL_VOID;
  sParent_id          = JSVAL_VOID;
  sScrollbars_id      = JSVAL_VOID;
  sLocation_id        = JSVAL_VOID;
  sComponents_id      = JSVAL_VOID;
  sConstructor_id     = JSVAL_VOID;
  s_content_id        = JSVAL_VOID;
  sContent_id         = JSVAL_VOID;
  sMenubar_id         = JSVAL_VOID;
  sToolbar_id         = JSVAL_VOID;
  sLocationbar_id     = JSVAL_VOID;
  sPersonalbar_id     = JSVAL_VOID;
  sStatusbar_id       = JSVAL_VOID;
  sDirectories_id     = JSVAL_VOID;
  sControllers_id     = JSVAL_VOID;
  sLength_id          = JSVAL_VOID;
  sInnerHeight_id     = JSVAL_VOID;
  sInnerWidth_id      = JSVAL_VOID;
  sOuterHeight_id     = JSVAL_VOID;
  sOuterWidth_id      = JSVAL_VOID;
  sScreenX_id         = JSVAL_VOID;
  sScreenY_id         = JSVAL_VOID;
  sStatus_id          = JSVAL_VOID;
  sName_id            = JSVAL_VOID;
  sOnmousedown_id     = JSVAL_VOID;
  sOnmouseup_id       = JSVAL_VOID;
  sOnclick_id         = JSVAL_VOID;
  sOndblclick_id      = JSVAL_VOID;
  sOncontextmenu_id   = JSVAL_VOID;
  sOnmouseover_id     = JSVAL_VOID;
  sOnmouseout_id      = JSVAL_VOID;
  sOnkeydown_id       = JSVAL_VOID;
  sOnkeyup_id         = JSVAL_VOID;
  sOnkeypress_id      = JSVAL_VOID;
  sOnmousemove_id     = JSVAL_VOID;
  sOnfocus_id         = JSVAL_VOID;
  sOnblur_id          = JSVAL_VOID;
  sOnsubmit_id        = JSVAL_VOID;
  sOnreset_id         = JSVAL_VOID;
  sOnchange_id        = JSVAL_VOID;
  sOnselect_id        = JSVAL_VOID;
  sOnload_id          = JSVAL_VOID;
  sOnbeforeunload_id  = JSVAL_VOID;
  sOnunload_id        = JSVAL_VOID;
  sOnpageshow_id      = JSVAL_VOID;
  sOnpagehide_id      = JSVAL_VOID;
  sOnabort_id         = JSVAL_VOID;
  sOnerror_id         = JSVAL_VOID;
  sOnpaint_id         = JSVAL_VOID;
  sOnresize_id        = JSVAL_VOID;
  sOnscroll_id        = JSVAL_VOID;
  sScrollIntoView_id  = JSVAL_VOID;
  sScrollX_id         = JSVAL_VOID;
  sScrollY_id         = JSVAL_VOID;
  sScrollMaxX_id      = JSVAL_VOID;
  sScrollMaxY_id      = JSVAL_VOID;
  sOpen_id            = JSVAL_VOID;
  sItem_id            = JSVAL_VOID;
  sEnumerate_id       = JSVAL_VOID;
  sNavigator_id       = JSVAL_VOID;
  sDocument_id        = JSVAL_VOID;
  sWindow_id          = JSVAL_VOID;
  sFrames_id          = JSVAL_VOID;
  sSelf_id            = JSVAL_VOID;
  sOpener_id          = JSVAL_VOID;

  NS_IF_RELEASE(sXPConnect);
  NS_IF_RELEASE(sSecMan);
  sIsInitialized = PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsDOMClassInfo::ThrowJSException ( JSContext cx,
nsresult  aResult 
) [static, inherited]

Definition at line 1428 of file nsDOMClassInfo.cpp.

{
  do {
    nsCOMPtr<nsIExceptionService> xs =
      do_GetService(NS_EXCEPTIONSERVICE_CONTRACTID);
    if (!xs) {
      break;
    }

    nsCOMPtr<nsIExceptionManager> xm;
    nsresult rv = xs->GetCurrentExceptionManager(getter_AddRefs(xm));
    if (NS_FAILED(rv)) {
      break;
    }

    nsCOMPtr<nsIException> exception;
    rv = xm->GetExceptionFromProvider(aResult, 0, getter_AddRefs(exception));
    if (NS_FAILED(rv) || !exception) {
      break;
    }

    jsval jv;
    nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
    rv = WrapNative(cx, ::JS_GetGlobalObject(cx), exception,
                    NS_GET_IID(nsIException), &jv, getter_AddRefs(holder));
    if (NS_FAILED(rv) || JSVAL_IS_NULL(jv)) {
      break;
    }
    JS_SetPendingException(cx, jv);

    return NS_OK;
  } while (0);

  // XXX This probably wants to be localized, but that can fail in ways that
  // are hard to report correctly.
  JSString *str =
    JS_NewStringCopyZ(cx, "An error occured throwing an exception");
  if (!str) {
    // JS_NewStringCopyZ reported the error for us.
    return NS_OK; 
  }
  JS_SetPendingException(cx, STRING_TO_JSVAL(str));
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsDOMClassInfo::UnsetExternallyReferenced ( nsIDOMGCParticipant aParticipant) [static, inherited]

Definition at line 5268 of file nsDOMClassInfo.cpp.

{
  NS_PRECONDITION(aParticipant, "unexpected null pointer");

  NS_ASSERTION(sExternallyReferencedTable.ops, "unbalanced call");
  if (sExternallyReferencedTable.ops) {
#ifdef DEBUG
    PRUint32 count = sExternallyReferencedTable.entryCount;
#endif
    PL_DHashTableOperate(&sExternallyReferencedTable, aParticipant,
                         PL_DHASH_REMOVE);
#ifdef DEBUG
    NS_ASSERTION(count == sExternallyReferencedTable.entryCount + 1,
                 "unbalanced call");
#endif
  }

  // Don't destroy the table when the entryCount hits zero, since that
  // is expected to happen often.  Instead, destroy it at shutdown.
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsDOMClassInfo::WrapNative ( JSContext cx,
JSObject scope,
nsISupports *  native,
const nsIID aIID,
jsval vp,
nsIXPConnectJSObjectHolder **  aHolder 
) [static, inherited]

Definition at line 1397 of file nsDOMClassInfo.cpp.

{
  *aHolder = nsnull;
  
  if (!native) {
    *vp = JSVAL_NULL;

    return NS_OK;
  }

  NS_ENSURE_TRUE(sXPConnect, NS_ERROR_UNEXPECTED);

  nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
  nsresult rv = sXPConnect->WrapNative(cx, GetGlobalJSObject(cx, scope),
                                       native, aIID, getter_AddRefs(holder));
  NS_ENSURE_SUCCESS(rv, rv);

  JSObject* obj = nsnull;
  rv = holder->GetJSObject(&obj);
  NS_ENSURE_SUCCESS(rv, rv);

  *vp = OBJECT_TO_JSVAL(obj);
  holder.swap(*aHolder);

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 85 of file nsIXPCScriptable.idl.

Definition at line 86 of file nsIXPCScriptable.idl.

A human readable string naming the class, or null.

Definition at line 86 of file nsIClassInfo.idl.

readonly attribute nsCIDPtr nsIClassInfo::classID [inherited]

A class ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|), or null.

Definition at line 92 of file nsIClassInfo.idl.

Also a class ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|).

If the class does not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute exists so C++ callers can avoid allocating and freeing a CID, as would happen if they used classID.

Definition at line 130 of file nsIClassInfo.idl.

Definition at line 84 of file nsIXPCScriptable.idl.

Definition at line 98 of file nsIXPCScriptable.idl.

'flags' attribute bitflag: whether objects of this type implement nsIContent.

Definition at line 113 of file nsIClassInfo.idl.

A contract ID through which an instance of this class can be created (or accessed as a service, if |flags & SINGLETON|), or null.

Definition at line 81 of file nsIClassInfo.idl.

const PRUint32 nsIClassInfo::DOM_OBJECT = 1 << 3 [inherited]

Definition at line 106 of file nsIClassInfo.idl.

Definition at line 83 of file nsIXPCScriptable.idl.

Definition at line 82 of file nsIXPCScriptable.idl.

Definition at line 81 of file nsIXPCScriptable.idl.

Definition at line 88 of file nsIXPCScriptable.idl.

Definition at line 87 of file nsIXPCScriptable.idl.

Definition at line 108 of file nsIClassInfo.idl.

readonly attribute PRUint32 nsIClassInfo::flags [inherited]

Definition at line 121 of file nsIClassInfo.idl.

Return language type from list in nsIProgrammingLanguage.

Definition at line 98 of file nsIClassInfo.idl.

Definition at line 105 of file nsIClassInfo.idl.

Definition at line 260 of file nsDOMClassInfo.h.

Definition at line 107 of file nsIClassInfo.idl.

const PRUint32 nsIXPCScriptable::RESERVED = 1 << 31 [inherited]

Definition at line 96 of file nsIXPCScriptable.idl.

const PRUint32 nsIClassInfo::RESERVED = 1 << 31 [inherited]

Definition at line 118 of file nsIClassInfo.idl.

jsval nsDOMClassInfo::s_content_id = JSVAL_VOID [static, protected, inherited]

Definition at line 333 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sAdd_id = JSVAL_VOID [static, protected, inherited]

Definition at line 393 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sAddEventListener_id = JSVAL_VOID [static, protected, inherited]

Definition at line 396 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sAll_id = JSVAL_VOID [static, protected, inherited]

Definition at line 394 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sComponents_id = JSVAL_VOID [static, protected, inherited]

Definition at line 331 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sConstructor_id = JSVAL_VOID [static, protected, inherited]

Definition at line 332 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sContent_id = JSVAL_VOID [static, protected, inherited]

Definition at line 334 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sControllers_id = JSVAL_VOID [static, protected, inherited]

Definition at line 341 of file nsDOMClassInfo.h.

Definition at line 99 of file nsIXPCScriptable.idl.

jsval nsDOMClassInfo::sDirectories_id = JSVAL_VOID [static, protected, inherited]

Definition at line 340 of file nsDOMClassInfo.h.

Definition at line 324 of file nsDOMClassInfo.h.

Definition at line 325 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sDocument_id = JSVAL_VOID [static, protected, inherited]

Definition at line 388 of file nsDOMClassInfo.h.

Initial value:

Definition at line 314 of file nsDOMClassInfo.h.

JSClass nsDOMClassInfo::sDOMJSClass [static, inherited]

Definition at line 143 of file nsDOMClassInfo.h.

JSFunctionSpec nsDOMClassInfo::sDOMJSClass_methods[] [static, protected, inherited]

Definition at line 315 of file nsDOMClassInfo.h.

Definition at line 402 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sEnumerate_id = JSVAL_VOID [static, protected, inherited]

Definition at line 386 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sFrames_id = JSVAL_VOID [static, protected, inherited]

Definition at line 390 of file nsDOMClassInfo.h.

const PRUint32 nsIClassInfo::SINGLETON = 1 << 0 [inherited]

Bitflags for 'flags' attribute.

Definition at line 103 of file nsIClassInfo.idl.

jsval nsDOMClassInfo::sInnerHeight_id = JSVAL_VOID [static, protected, inherited]

Definition at line 343 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sInnerWidth_id = JSVAL_VOID [static, protected, inherited]

Definition at line 344 of file nsDOMClassInfo.h.

PRBool nsDOMClassInfo::sIsInitialized = PR_FALSE [static, protected, inherited]

Definition at line 323 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sItem_id = JSVAL_VOID [static, protected, inherited]

Definition at line 384 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sLength_id = JSVAL_VOID [static, protected, inherited]

Definition at line 342 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sLocation_id = JSVAL_VOID [static, protected, inherited]

Definition at line 330 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sLocationbar_id = JSVAL_VOID [static, protected, inherited]

Definition at line 337 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sMenubar_id = JSVAL_VOID [static, protected, inherited]

Definition at line 335 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sName_id = JSVAL_VOID [static, protected, inherited]

Definition at line 350 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sNamedItem_id = JSVAL_VOID [static, protected, inherited]

Definition at line 385 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sNavigator_id = JSVAL_VOID [static, protected, inherited]

Definition at line 387 of file nsDOMClassInfo.h.

const JSClass * nsDOMClassInfo::sObjectClass = nsnull [static, protected, inherited]

Definition at line 398 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnabort_id = JSVAL_VOID [static, protected, inherited]

Definition at line 373 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnbeforeunload_id = JSVAL_VOID [static, protected, inherited]

Definition at line 369 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnblur_id = JSVAL_VOID [static, protected, inherited]

Definition at line 363 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnchange_id = JSVAL_VOID [static, protected, inherited]

Definition at line 366 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnclick_id = JSVAL_VOID [static, protected, inherited]

Definition at line 353 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOncontextmenu_id = JSVAL_VOID [static, protected, inherited]

Definition at line 355 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOndblclick_id = JSVAL_VOID [static, protected, inherited]

Definition at line 354 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnerror_id = JSVAL_VOID [static, protected, inherited]

Definition at line 374 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnfocus_id = JSVAL_VOID [static, protected, inherited]

Definition at line 362 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnkeydown_id = JSVAL_VOID [static, protected, inherited]

Definition at line 358 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnkeypress_id = JSVAL_VOID [static, protected, inherited]

Definition at line 360 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnkeyup_id = JSVAL_VOID [static, protected, inherited]

Definition at line 359 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnload_id = JSVAL_VOID [static, protected, inherited]

Definition at line 368 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnmousedown_id = JSVAL_VOID [static, protected, inherited]

Definition at line 351 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnmousemove_id = JSVAL_VOID [static, protected, inherited]

Definition at line 361 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnmouseout_id = JSVAL_VOID [static, protected, inherited]

Definition at line 357 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnmouseover_id = JSVAL_VOID [static, protected, inherited]

Definition at line 356 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnmouseup_id = JSVAL_VOID [static, protected, inherited]

Definition at line 352 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnpagehide_id = JSVAL_VOID [static, protected, inherited]

Definition at line 372 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnpageshow_id = JSVAL_VOID [static, protected, inherited]

Definition at line 371 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnpaint_id = JSVAL_VOID [static, protected, inherited]

Definition at line 375 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnreset_id = JSVAL_VOID [static, protected, inherited]

Definition at line 365 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnresize_id = JSVAL_VOID [static, protected, inherited]

Definition at line 376 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnscroll_id = JSVAL_VOID [static, protected, inherited]

Definition at line 377 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnselect_id = JSVAL_VOID [static, protected, inherited]

Definition at line 367 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnsubmit_id = JSVAL_VOID [static, protected, inherited]

Definition at line 364 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOnunload_id = JSVAL_VOID [static, protected, inherited]

Definition at line 370 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOpen_id = JSVAL_VOID [static, protected, inherited]

Definition at line 383 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOpener_id = JSVAL_VOID [static, protected, inherited]

Definition at line 392 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOuterHeight_id = JSVAL_VOID [static, protected, inherited]

Definition at line 345 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sOuterWidth_id = JSVAL_VOID [static, protected, inherited]

Definition at line 346 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sParent_id = JSVAL_VOID [static, protected, inherited]

Definition at line 328 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sPersonalbar_id = JSVAL_VOID [static, protected, inherited]

Definition at line 338 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sScreenX_id = JSVAL_VOID [static, protected, inherited]

Definition at line 347 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sScreenY_id = JSVAL_VOID [static, protected, inherited]

Definition at line 348 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sScrollbars_id = JSVAL_VOID [static, protected, inherited]

Definition at line 329 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sScrollIntoView_id = JSVAL_VOID [static, protected, inherited]

Definition at line 378 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sScrollMaxX_id = JSVAL_VOID [static, protected, inherited]

Definition at line 381 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sScrollMaxY_id = JSVAL_VOID [static, protected, inherited]

Definition at line 382 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sScrollX_id = JSVAL_VOID [static, protected, inherited]

Definition at line 379 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sScrollY_id = JSVAL_VOID [static, protected, inherited]

Definition at line 380 of file nsDOMClassInfo.h.

nsIScriptSecurityManager * nsDOMClassInfo::sSecMan = nsnull [static, protected, inherited]

Definition at line 318 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sSelf_id = JSVAL_VOID [static, protected, inherited]

Definition at line 391 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sStatus_id = JSVAL_VOID [static, protected, inherited]

Definition at line 349 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sStatusbar_id = JSVAL_VOID [static, protected, inherited]

Definition at line 339 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sTags_id = JSVAL_VOID [static, protected, inherited]

Definition at line 395 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sToolbar_id = JSVAL_VOID [static, protected, inherited]

Definition at line 336 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sTop_id = JSVAL_VOID [static, protected, inherited]

Definition at line 327 of file nsDOMClassInfo.h.

jsval nsDOMClassInfo::sWindow_id = JSVAL_VOID [static, protected, inherited]

Definition at line 389 of file nsDOMClassInfo.h.

const JSClass * nsDOMClassInfo::sXPCNativeWrapperClass = nsnull [static, protected, inherited]

Definition at line 399 of file nsDOMClassInfo.h.

nsIXPConnect * nsDOMClassInfo::sXPConnect = nsnull [static, protected, inherited]

Definition at line 317 of file nsDOMClassInfo.h.

const PRUint32 nsIClassInfo::THREADSAFE = 1 << 1 [inherited]

Definition at line 104 of file nsIClassInfo.idl.

Definition at line 78 of file nsIXPCScriptable.idl.

Definition at line 79 of file nsIXPCScriptable.idl.

Definition at line 80 of file nsIXPCScriptable.idl.

Definition at line 64 of file nsIXPCScriptable.idl.

Definition at line 74 of file nsIXPCScriptable.idl.

Definition at line 73 of file nsIXPCScriptable.idl.

Definition at line 75 of file nsIXPCScriptable.idl.

Definition at line 71 of file nsIXPCScriptable.idl.

Definition at line 62 of file nsIXPCScriptable.idl.

Definition at line 65 of file nsIXPCScriptable.idl.

Definition at line 68 of file nsIXPCScriptable.idl.

Definition at line 89 of file nsIXPCScriptable.idl.

Definition at line 72 of file nsIXPCScriptable.idl.

Definition at line 66 of file nsIXPCScriptable.idl.

Definition at line 76 of file nsIXPCScriptable.idl.

Definition at line 91 of file nsIXPCScriptable.idl.

Definition at line 77 of file nsIXPCScriptable.idl.

Definition at line 69 of file nsIXPCScriptable.idl.

Definition at line 70 of file nsIXPCScriptable.idl.

Definition at line 90 of file nsIXPCScriptable.idl.

Definition at line 63 of file nsIXPCScriptable.idl.

Definition at line 61 of file nsIXPCScriptable.idl.

Definition at line 67 of file nsIXPCScriptable.idl.


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