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
nsHTMLExternalObjSH Class Reference

#include <nsDOMClassInfo.h>

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

List of all members.

Public Member Functions

NS_IMETHOD PostCreate (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj)
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 Call (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, PRUint32 argc, jsval *argv, jsval *vp, PRBool *_retval)
NS_IMETHOD NewResolve (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval id, PRUint32 flags, JSObject **objp, PRBool *_retval)
NS_IMETHOD PreCreate (nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj)
NS_IMETHOD AddProperty (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj, jsval id, jsval *vp, PRBool *_retval)
NS_IMETHOD GetFlags (PRUint32 *aFlags)
NS_IMETHOD Finalize (nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj)
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 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

 nsHTMLExternalObjSH (nsDOMClassInfoData *aData)
virtual ~nsHTMLExternalObjSH ()
nsresult GetPluginInstance (nsIXPConnectWrappedNative *aWrapper, nsIPluginInstance **aResult)
virtual nsresult GetPluginJSObject (JSContext *cx, JSObject *obj, nsIPluginInstance *plugin_inst, JSObject **plugin_obj, JSObject **plugin_proto)=0
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 JSBool JS_DLL_CALLBACK ScrollIntoView (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
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 1071 of file nsDOMClassInfo.h.


Constructor & Destructor Documentation

Definition at line 1074 of file nsDOMClassInfo.h.

                                                 : nsHTMLElementSH(aData)
  {
  }
virtual nsHTMLExternalObjSH::~nsHTMLExternalObjSH ( ) [inline, protected, virtual]

Definition at line 1078 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 nsNodeSH::AddProperty ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
jsval vp,
PRBool _retval 
) [inherited]

Reimplemented from nsEventReceiverSH.

Reimplemented in nsHTMLFrameElementSH, and nsDocumentSH.

Definition at line 6679 of file nsDOMClassInfo.cpp.

{
  // This can fail on out-of-memory, which should end up throwing a JS
  // exception.
  nsresult rv = nsDOMClassInfo::PreserveNodeWrapper(wrapper);
  NS_ENSURE_SUCCESS(rv, rv);

  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]
NS_IMETHODIMP nsHTMLExternalObjSH::Call ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
PRUint32  argc,
jsval argv,
jsval vp,
PRBool _retval 
)

Definition at line 9147 of file nsDOMClassInfo.cpp.

{
  nsCOMPtr<nsIPluginInstance> pi;
  nsresult rv = GetPluginInstance(wrapper, getter_AddRefs(pi));
  NS_ENSURE_SUCCESS(rv, rv);

  if (!pi) {
    // No plugin around for this object.

    return NS_ERROR_NOT_AVAILABLE;
  }

  JSObject *pi_obj = nsnull;
  JSObject *pi_proto = nsnull;

  rv = GetPluginJSObject(cx, obj, pi, &pi_obj, &pi_proto);
  NS_ENSURE_SUCCESS(rv, rv);

  if (!pi) {
    return NS_ERROR_NOT_AVAILABLE;
  }

  // XPConnect passes us the XPConnect wrapper JSObject as obj, and
  // not the 'this' parameter that the JS engine passes in. Pass in
  // the real this parameter from JS (argv[-1]) here.
  *_retval = ::JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(argv[-1]),
                                    OBJECT_TO_JSVAL(pi_obj), argc, argv, vp);

  return NS_OK;
}

Here is the call graph for this function:

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:

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* nsHTMLElementSH::doCreate ( nsDOMClassInfoData aData) [inline, static, inherited]

Reimplemented from nsElementSH.

Reimplemented in nsHTMLPluginObjElementSH, nsHTMLAppletElementSH, nsHTMLSelectElementSH, nsHTMLFrameElementSH, and nsHTMLFormElementSH.

Definition at line 962 of file nsDOMClassInfo.h.

  {
    return new nsHTMLElementSH(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:

Reimplemented in nsWindowSH.

Definition at line 7003 of file nsDOMClassInfo.cpp.

{
  nsDOMClassInfo::ReleaseWrapper(wrapper);
  return NS_OK;
}

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:

NS_IMETHODIMP nsNodeSH::GetFlags ( PRUint32 aFlags) [inherited]

Reimplemented in nsDocumentSH.

Definition at line 6691 of file nsDOMClassInfo.cpp.

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.

Definition at line 8863 of file nsDOMClassInfo.cpp.

{
  *_result = nsnull;

  nsCOMPtr<nsIContent> content(do_QueryWrappedNative(wrapper));
  NS_ENSURE_TRUE(content, NS_ERROR_UNEXPECTED);

  nsCOMPtr<nsIDocument> doc = content->GetDocument();

  if (!doc) {
    // No document, no plugin.

    return NS_OK;
  }

  // Have to flush layout, since plugin instance instantiation
  // currently happens in reflow!  That's just uncool.
  doc->FlushPendingNotifications(Flush_Layout);

  // See if we have a frame.
  nsIPresShell *shell = doc->GetShellAt(0);

  if (!shell) {
    return NS_OK;
  }

  nsIFrame* frame = nsnull;
  shell->GetPrimaryFrameFor(content, &frame);

  if (!frame) {
    // No frame, no plugin

    return NS_OK;
  }

  nsIObjectFrame* objectFrame = nsnull;
  CallQueryInterface(frame, &objectFrame);
  if (!objectFrame) {
    return NS_OK;
  }

  return objectFrame->GetPluginInstance(*_result);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual nsresult nsHTMLExternalObjSH::GetPluginJSObject ( JSContext cx,
JSObject obj,
nsIPluginInstance plugin_inst,
JSObject **  plugin_obj,
JSObject **  plugin_proto 
) [protected, pure virtual]

Implemented in nsHTMLPluginObjElementSH, and nsHTMLAppletElementSH.

Here is the caller graph for this function:

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

Definition at line 9057 of file nsDOMClassInfo.cpp.

{
  JSObject *pi_obj = ::JS_GetPrototype(cx, obj);
  if (NS_UNLIKELY(!pi_obj)) {
    return NS_OK;
  }

  const jschar *id_chars = nsnull;
  size_t id_length = 0;

  JSBool found = PR_FALSE;

  if (!ObjectIsNativeWrapper(cx, obj)) {
    if (JSVAL_IS_STRING(id)) {
      JSString *id_str = JSVAL_TO_STRING(id);

      id_chars = ::JS_GetStringChars(id_str);
      id_length = ::JS_GetStringLength(id_str);

      *_retval = ::JS_HasUCProperty(cx, pi_obj, id_chars, id_length, &found);
    } else {
      *_retval = JS_HasElement(cx, pi_obj, JSVAL_TO_INT(id), &found);
    }

    if (!*_retval) {
      return NS_ERROR_UNEXPECTED;
    }
  }

  if (found) {
    if (JSVAL_IS_STRING(id)) {
      *_retval = ::JS_GetUCProperty(cx, pi_obj, id_chars, id_length, vp);
    } else {
      *_retval = ::JS_GetElement(cx, pi_obj, JSVAL_TO_INT(id), vp);
    }

    return *_retval ? NS_SUCCESS_I_DID_SOMETHING : NS_ERROR_FAILURE;
  }

  return nsElementSH::GetProperty(wrapper, cx, obj, id, vp, _retval);
}

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 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]
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 nsHTMLElementSH::NewResolve ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
PRUint32  flags,
JSObject **  objp,
PRBool _retval 
) [inherited]

Reimplemented from nsEventReceiverSH.

Reimplemented in nsHTMLPluginObjElementSH, nsHTMLFrameElementSH, and nsHTMLFormElementSH.

Definition at line 8462 of file nsDOMClassInfo.cpp.

{
  if (id == sScrollIntoView_id && !(JSRESOLVE_ASSIGNING & flags)) {
    JSString *str = JSVAL_TO_STRING(id);
    JSFunction *cfnc =
      ::JS_DefineFunction(cx, obj, ::JS_GetStringBytes(str), ScrollIntoView,
                          0, 0);

    *objp = obj;

    return cfnc ? NS_OK : NS_ERROR_UNEXPECTED;
  }

  return nsElementSH::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:

Reimplemented from nsElementSH.

Definition at line 8936 of file nsDOMClassInfo.cpp.

{
  nsresult rv = nsElementSH::PostCreate(wrapper, cx, obj);
  NS_ENSURE_SUCCESS(rv, rv);

  nsCOMPtr<nsIPluginInstance> pi;
  rv = GetPluginInstance(wrapper, getter_AddRefs(pi));
  NS_ENSURE_SUCCESS(rv, rv);

  if (!pi) {
    // No plugin around for this object.

    return NS_OK;
  }

  JSObject *pi_obj = nsnull; // XPConnect-wrapped peer object, when we get it.
  JSObject *pi_proto = nsnull; // 'pi.__proto__'

  rv = GetPluginJSObject(cx, obj, pi, &pi_obj, &pi_proto);
  NS_ENSURE_SUCCESS(rv, rv);

  if (!pi_obj) {
    // Didn't get a plugin instance JSObject, nothing we can do then.

    return NS_OK;
  }

  if (IsObjInProtoChain(cx, obj, pi_obj)) {
    // We must have re-entered ::PostCreate() from nsObjectFrame()
    // (through the FlushPendingNotifications() call in
    // GetPluginInstance()), this means that we've already done what
    // we're about to do in this function so we can just return here.

    return NS_OK;
  }


  // If we got an xpconnect-wrapped plugin object, set obj's
  // prototype's prototype to the scriptable plugin.

  JSObject *my_proto = nsnull;

  // Get 'this.__proto__'
  rv = wrapper->GetJSObjectPrototype(&my_proto);
  NS_ENSURE_SUCCESS(rv, rv);

  // Set 'this.__proto__' to pi
  if (!::JS_SetPrototype(cx, obj, pi_obj)) {
    return NS_ERROR_UNEXPECTED;
  }

  if (pi_proto && JS_GET_CLASS(cx, pi_proto) != sObjectClass) {
    // The plugin wrapper has a proto that's not Object.prototype, set
    // 'pi.__proto__.__proto__' to the original 'this.__proto__'
    if (!::JS_SetPrototype(cx, pi_proto, my_proto)) {
      return NS_ERROR_UNEXPECTED;
    }
  } else {
    // 'pi' didn't have a prototype, or pi's proto was 'Object.prototype'
    // (i.e. pi is an LiveConnect wrapped Java applet), set
    // 'pi.__proto__' to the original 'this.__proto__'
    if (!::JS_SetPrototype(cx, pi_obj, my_proto)) {
      return NS_ERROR_UNEXPECTED;
    }
  }

  // Before this proto dance the objects involved looked like this:
  //
  // this.__proto__.__proto__
  //   ^      ^         ^
  //   |      |         |__ Object.prototype
  //   |      |
  //   |      |__ xpc embed wrapper proto (shared)
  //   |
  //   |__ xpc wrapped native embed node
  //
  // pi.__proto__.__proto__
  // ^      ^         ^
  // |      |         |__ Object.prototype
  // |      |
  // |      |__ plugin proto (not shared in the xpc wrapper case)
  // |
  // |__ xpc wrapped native pi (plugin instance)
  //
  // Now, after the above prototype setup the prototype chain should
  // look like this if the plugin had a proto (other than
  // Object.prototype):
  //
  // this.__proto__.__proto__.__proto__.__proto__
  //   ^      ^         ^         ^         ^
  //   |      |         |         |         |__ Object.prototype
  //   |      |         |         |
  //   |      |         |         |__ xpc embed wrapper proto (shared)
  //   |      |         |
  //   |      |         |__ plugin proto (not shared in the xpc wrapper case)
  //   |      |
  //   |      |__ xpc wrapped native pi (plugin instance)
  //   |
  //   |__ xpc wrapped native embed node
  //
  // If the plugin's proto was Object.prototype, the prototype chain
  // should look like this:
  //
  // this.__proto__.__proto__.__proto__
  //   ^      ^         ^         ^
  //   |      |         |         |__ Object.prototype
  //   |      |         |
  //   |      |         |__ xpc embed wrapper proto (shared)
  //   |      |
  //   |      |__ pi (plugin instance) wrapper, most likely wrapped
  //   |          by LiveConnect
  //   |
  //   |__ xpc wrapped native embed node
  //

  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 nsNodeSH::PreCreate ( nsISupports *  nativeObj,
JSContext cx,
JSObject globalObj,
JSObject **  parentObj 
) [inherited]

Definition at line 6579 of file nsDOMClassInfo.cpp.

{
  nsCOMPtr<nsIContent> content(do_QueryInterface(nativeObj));
  nsCOMPtr<nsIDocument> doc;

  if (content) {
    // Make sure that we get the owner document of the content node, in case
    // we're in document teardown.  If we are, it's important to *not* use
    // globalObj as the nodes parent since that would give the node the
    // principal of globalObj (i.e. the principal of the document that's being
    // loaded) and not the principal of the document that's being unloaded.
    // See http://bugzilla.mozilla.org/show_bug.cgi?id=227417
    doc = content->GetOwnerDoc();
  }

  if (!doc) {
    doc = do_QueryInterface(nativeObj);

    if (!doc) {
      // No document reachable from nativeObj, use the global object
      // that was passed to this method.

      *parentObj = globalObj;

      return NS_OK;
    }
  }

  nsISupports *native_parent;

  if (content) {
    if (content->IsContentOfType(nsIContent::eXUL)) {
      // For XUL elements, use the parent, if any.
      native_parent = content->GetParent();

      if (!native_parent) {
        native_parent = doc;
      }
    } else {
      // For non-XUL elements, use the document as scope parent.
      native_parent = doc;

      // But for HTML form controls, use the form as scope parent.
      if (content->IsContentOfType(nsIContent::eELEMENT |
                                   nsIContent::eHTML |
                                   nsIContent::eHTML_FORM_CONTROL)) {
        nsCOMPtr<nsIFormControl> form_control(do_QueryInterface(content));

        if (form_control) {
          nsCOMPtr<nsIDOMHTMLFormElement> form;
          form_control->GetForm(getter_AddRefs(form));

          if (form) {
            // Found a form, use it.
            native_parent = form;
          }
        }
      }
    }
  } else {
    // We're called for a document object (since content is null),
    // set the parent to be the document's global object, if there
    // is one

    // Get the scope object from the document.
    nsCOMPtr<nsIDocument_MOZILLA_1_8_0_BRANCH> doc18(do_QueryInterface(doc));
    if (!doc18) {
      NS_ERROR("Unexpected document");
      return NS_ERROR_FAILURE;
    }
    native_parent = doc18->GetScopeObject();

    if (!native_parent) {
      // No global object reachable from this document, use the
      // global object that was passed to this method.

      *parentObj = globalObj;

      return NS_OK;
    }
  }

  // XXXjst: Maybe we need to find the global to use from the
  // nsIScriptGlobalObject that's reachable from the node we're about
  // to wrap here? But that's not always reachable, let's use
  // globalObj for now...

  jsval v;
  nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
  nsresult rv = WrapNative(cx, globalObj, native_parent,
                           NS_GET_IID(nsISupports), &v,
                           getter_AddRefs(holder));

  *parentObj = JSVAL_TO_OBJECT(v);

  return rv;
}

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:

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

Definition at line 8432 of file nsDOMClassInfo.cpp.

{
  nsCOMPtr<nsIXPConnectWrappedNative> wrapper;

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

    return JS_FALSE;
  }

  nsCOMPtr<nsIDOMNSHTMLElement> element(do_QueryWrappedNative(wrapper));
  NS_ENSURE_TRUE(element, JS_FALSE);

  JSBool top = JS_TRUE;

  if (argc > 0) {
    ::JS_ValueToBoolean(cx, argv[0], &top);
  }

  rv = element->ScrollIntoView(top);

  *rval = JSVAL_VOID;

  return NS_SUCCEEDED(rv);
}

Here is the call graph for this function:

Here is the caller 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 nsHTMLExternalObjSH::SetProperty ( nsIXPConnectWrappedNative wrapper,
JSContext cx,
JSObject obj,
jsval  id,
jsval vp,
PRBool _retval 
)

Reimplemented from nsEventReceiverSH.

Definition at line 9102 of file nsDOMClassInfo.cpp.

{
  JSObject *pi_obj = ::JS_GetPrototype(cx, obj);
  if (NS_UNLIKELY(!pi_obj)) {
    return NS_OK;
  }

  const jschar *id_chars = nsnull;
  size_t id_length = 0;

  JSBool found = PR_FALSE;

  if (!ObjectIsNativeWrapper(cx, obj)) {
    if (JSVAL_IS_STRING(id)) {
      JSString *id_str = JSVAL_TO_STRING(id);

      id_chars = ::JS_GetStringChars(id_str);
      id_length = ::JS_GetStringLength(id_str);

      *_retval = ::JS_HasUCProperty(cx, pi_obj, id_chars, id_length, &found);
    } else {
      *_retval = JS_HasElement(cx, pi_obj, JSVAL_TO_INT(id), &found);
    }

    if (!*_retval) {
      return NS_ERROR_UNEXPECTED;
    }
  }

  if (found) {
    if (JSVAL_IS_STRING(id)) {
      *_retval = ::JS_SetUCProperty(cx, pi_obj, id_chars, id_length, vp);
    } else {
      *_retval = ::JS_SetElement(cx, pi_obj, JSVAL_TO_INT(id), vp);
    }

    return *_retval ? NS_SUCCESS_I_DID_SOMETHING : NS_ERROR_FAILURE;
  }

  return nsElementSH::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: