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() : mCharacterSet(NS_LITERAL_CSTRING("ISO-8859-1")), mNextContentID(NS_CONTENT_ID_COUNTER_BASE) {      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)// ==================================================================// =// ==================================================================  // NOTE! nsDocument::operator new() zeroes out all members, so don't  // bother initializing members to 0.nsDocument::nsDocument()  : mCharacterSet(NS_LITERAL_CSTRING("ISO-8859-1")),    mNextContentID(NS_CONTENT_ID_COUNTER_BASE){  // NOTE! nsDocument::operator new() zeroes out all members, so don't  // bother initializing members to 0.  // Force initialization.  mBindingManager = do_CreateInstance("@mozilla.org/xbl/binding-manager;1");  nsCOMPtr<nsIDocumentObserver> observer(do_QueryInterface(mBindingManager));  if (observer) {    // The binding manager must always be the first observer of the    // document.    mObservers.InsertElementAt(observer, 0);  }}