bug 805787 - fix for build failure in nsNodeUtils.cpp with Apple clang 4.0 or other not-up-to-date versions. r=dbaron
authorJonathan Kew <jkew@mozilla.com>
Fri, 26 Oct 2012 15:48:29 +0100
changeset 111631 80e4065a329edd3adbc048d7c82813fec34f6333
parent 111630 8586bd3508750056e1b59298a59cad02bf54b29c
child 111632 d7ab11d4f000298af1574e5e4109a49585801575
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersdbaron
bugs805787
milestone19.0a1
bug 805787 - fix for build failure in nsNodeUtils.cpp with Apple clang 4.0 or other not-up-to-date versions. r=dbaron
content/base/src/nsNodeUtils.cpp
content/base/src/nsStubDocumentObserver.h
content/base/src/nsStubMutationObserver.h
--- a/content/base/src/nsNodeUtils.cpp
+++ b/content/base/src/nsNodeUtils.cpp
@@ -41,18 +41,17 @@ using namespace mozilla::dom;
   PR_BEGIN_MACRO                                                  \
   bool needsEnterLeave = doc->MayHaveDOMMutationObservers();      \
   if (needsEnterLeave) {                                          \
     nsDOMMutationObserver::EnterMutationHandling();               \
   }                                                               \
   nsINode* node = content_;                                       \
   NS_ASSERTION(node->OwnerDoc() == doc, "Bogus document");        \
   if (doc) {                                                      \
-    static_cast<nsIMutationObserver*>(doc->BindingManager())->    \
-      func_ params_;                                              \
+    doc->BindingManager()->func_ params_;                         \
   }                                                               \
   do {                                                            \
     nsINode::nsSlots* slots = node->GetExistingSlots();           \
     if (slots && !slots->mMutationObservers.IsEmpty()) {          \
       /* No need to explicitly notify the first observer first    \
          since that'll happen anyway. */                          \
       NS_OBSERVER_ARRAY_NOTIFY_OBSERVERS(                         \
         slots->mMutationObservers, nsIMutationObserver,           \
--- a/content/base/src/nsStubDocumentObserver.h
+++ b/content/base/src/nsStubDocumentObserver.h
@@ -22,12 +22,13 @@
  *     for the empty virtual function implementations for every
  *     nsIDocumentObserver implementation)
  *  2. the performance of document's loop over observers benefits from
  *     the fact that more of the functions called are the same (which
  *     can reduce instruction cache misses and perhaps improve branch
  *     prediction)
  */
 class nsStubDocumentObserver : public nsIDocumentObserver {
+public:
   NS_DECL_NSIDOCUMENTOBSERVER
 };
 
 #endif /* !defined(nsStubDocumentObserver_h_) */
--- a/content/base/src/nsStubMutationObserver.h
+++ b/content/base/src/nsStubMutationObserver.h
@@ -22,12 +22,13 @@
  *     for the empty virtual function implementations for every
  *     nsIMutationObserver implementation)
  *  2. the performance of document's loop over observers benefits from
  *     the fact that more of the functions called are the same (which
  *     can reduce instruction cache misses and perhaps improve branch
  *     prediction)
  */
 class nsStubMutationObserver : public nsIMutationObserver {
+public:
   NS_DECL_NSIMUTATIONOBSERVER
 };
 
 #endif /* !defined(nsStubMutationObserver_h_) */