NS_INTERFACE_MAP_BEGIN(nsXPathDocumentTearoff) NS_INTERFACE_MAP_ENTRY(nsIDOMXPathEvaluator) NS_INTERFACE_MAP_END_AGGREGATED(mDocument) NS_IMPL_ADDREF_USING_AGGREGATOR(nsXPathDocumentTearoff, mDocument) NS_IMPL_RELEASE_USING_AGGREGATOR(nsXPathDocumentTearoff, mDocument)       nsDocument::nsDocument() : mSubDocuments(nsnull), mIsGoingAway(PR_FALSE), mCSSLoader(nsnull), mXPathDocument(nsnull) { NS_INIT_REFCNT();  mArena = nsnull; mDocumentURL = nsnull; mCharacterSet.Assign(NS_LITERAL_STRING("ISO-8859-1")); mParentDocument = nsnull; mRootContent = nsnull; mListenerManager = nsnull; mInDestructor = PR_FALSE; mNameSpaceManager = nsnull; mHeaderData = nsnull; mChildNodes = nsnull; mModCount = 0; mPrincipal = nsnull; mNextContentID = NS_CONTENT_ID_COUNTER_BASE; mDTD = 0; mBoxObjectTable = nsnull; mNumCapturers = 0; #ifdef IBMBIDI mBidiEnabled = PR_FALSE; #endif   mBindingManager = do_CreateInstance("@mozilla.org/xbl/binding-manager;1"); nsCOMPtr<nsIDocumentObserver> observer(do_QueryInterface(mBindingManager)); if (observer) mObservers.InsertElementAt(observer, 0); }
NS_INTERFACE_MAP_BEGIN(nsDOMImplementation) NS_INTERFACE_MAP_ENTRY(nsIDOMDOMImplementation) NS_INTERFACE_MAP_ENTRY(nsIPrivateDOMImplementation) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMDOMImplementation) NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(DOMImplementation) NS_INTERFACE_MAP_END
NS_INTERFACE_MAP_BEGIN(nsXPathDocumentTearoff)  NS_INTERFACE_MAP_ENTRY(nsIDOMXPathEvaluator)NS_INTERFACE_MAP_END_AGGREGATED(mDocument)NS_IMPL_ADDREF_USING_AGGREGATOR(nsXPathDocumentTearoff, mDocument)NS_IMPL_RELEASE_USING_AGGREGATOR(nsXPathDocumentTearoff, mDocument)// ==================================================================// =// ==================================================================nsDocument::nsDocument() : mSubDocuments(nsnull),                           mIsGoingAway(PR_FALSE),                           mCSSLoader(nsnull),                           mXPathDocument(nsnull){  NS_INIT_REFCNT();  mArena = nsnull;  mDocumentURL = nsnull;  mCharacterSet.Assign(NS_LITERAL_STRING("ISO-8859-1"));  mParentDocument = nsnull;  mRootContent = nsnull;  mListenerManager = nsnull;  mInDestructor = PR_FALSE;  mNameSpaceManager = nsnull;  mHeaderData = nsnull;  mChildNodes = nsnull;  mModCount = 0;  mPrincipal = nsnull;  mNextContentID = NS_CONTENT_ID_COUNTER_BASE;  mDTD = 0;  mBoxObjectTable = nsnull;  mNumCapturers = 0;#ifdef IBMBIDI  mBidiEnabled = PR_FALSE;#endif // IBMBIDI  // Force initialization.  mBindingManager = do_CreateInstance("@mozilla.org/xbl/binding-manager;1");  nsCOMPtr<nsIDocumentObserver> observer(do_QueryInterface(mBindingManager));  if (observer) // We must always be the first observer of the document.    mObservers.InsertElementAt(observer, 0);}