diff --git a/mozilla/htmlparser/src/CNavDTD.cpp b/mozilla/htmlparser/src/CNavDTD.cpp
index aac31b3c452..b2e2a5191f3 100644
--- a/mozilla/htmlparser/src/CNavDTD.cpp
+++ b/mozilla/htmlparser/src/CNavDTD.cpp
@@ -51,9 +51,6 @@
#include "nsHTMLEntities.h"
#include "nsLinebreakConverter.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/htmlparser/src/COtherDTD.cpp b/mozilla/htmlparser/src/COtherDTD.cpp
index b709d184eb3..fb1c1e14876 100644
--- a/mozilla/htmlparser/src/COtherDTD.cpp
+++ b/mozilla/htmlparser/src/COtherDTD.cpp
@@ -51,9 +51,6 @@
#include "nsHTMLEntities.h"
#include "nsLinebreakConverter.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/htmlparser/src/CRtfDTD.cpp b/mozilla/htmlparser/src/CRtfDTD.cpp
index 958621066be..f305743d2e5 100644
--- a/mozilla/htmlparser/src/CRtfDTD.cpp
+++ b/mozilla/htmlparser/src/CRtfDTD.cpp
@@ -45,9 +45,6 @@
#include "plstr.h"
#include "nsDebug.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/htmlparser/src/SelfTest.cpp b/mozilla/htmlparser/src/SelfTest.cpp
index e91ae283e1e..7fbbfaebecc 100644
--- a/mozilla/htmlparser/src/SelfTest.cpp
+++ b/mozilla/htmlparser/src/SelfTest.cpp
@@ -23,7 +23,6 @@
//Testing stream crap...
-#include
#include
#include
diff --git a/mozilla/htmlparser/src/nsDTDUtils.cpp b/mozilla/htmlparser/src/nsDTDUtils.cpp
index 6a0de02ba10..97ea6e7c247 100644
--- a/mozilla/htmlparser/src/nsDTDUtils.cpp
+++ b/mozilla/htmlparser/src/nsDTDUtils.cpp
@@ -929,10 +929,13 @@ nsDeque* nsObserverTopic::GetObserversForTag(eHTMLTags aTag) {
}
void nsObserverTopic::RegisterObserverForTag(nsIElementObserver *anObserver,eHTMLTags aTag) {
- if(mObservers[aTag] == nsnull) {
- mObservers[aTag] = new nsDeque(0);
+ if(anObserver) {
+ if(mObservers[aTag] == nsnull) {
+ mObservers[aTag] = new nsDeque(0);
+ }
+ NS_ADDREF(anObserver);
+ mObservers[aTag]->Push(anObserver);
}
- mObservers[aTag]->Push(anObserver);
}
diff --git a/mozilla/htmlparser/src/nsExpatDTD.cpp b/mozilla/htmlparser/src/nsExpatDTD.cpp
index 09ec32d7bfd..3f1a67332c7 100644
--- a/mozilla/htmlparser/src/nsExpatDTD.cpp
+++ b/mozilla/htmlparser/src/nsExpatDTD.cpp
@@ -47,9 +47,6 @@
#include "plstr.h"
#include "prlog.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp
index 085324b0474..1f987bba792 100644
--- a/mozilla/htmlparser/src/nsParser.cpp
+++ b/mozilla/htmlparser/src/nsParser.cpp
@@ -1594,8 +1594,9 @@ theContext->mTransferBufferSize;
theContext->mScanner->Append(theContext->mTransferBuffer,theNumRead);
#if 0
- int dump=0;
+ static int dump=0;
if(dump) {
+ theContext->mTransferBuffer[theNumRead]=0;
printf("\n-----------------\n%s",theContext->mTransferBuffer);
}
#endif
diff --git a/mozilla/htmlparser/src/nsValidDTD.cpp b/mozilla/htmlparser/src/nsValidDTD.cpp
index c14036eeb51..af5bb863892 100644
--- a/mozilla/htmlparser/src/nsValidDTD.cpp
+++ b/mozilla/htmlparser/src/nsValidDTD.cpp
@@ -48,9 +48,6 @@
#include "prio.h"
#include "plstr.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/htmlparser/src/nsViewSourceHTML.cpp b/mozilla/htmlparser/src/nsViewSourceHTML.cpp
index 7e1be349c9b..f9d3ce348a2 100644
--- a/mozilla/htmlparser/src/nsViewSourceHTML.cpp
+++ b/mozilla/htmlparser/src/nsViewSourceHTML.cpp
@@ -61,9 +61,6 @@
#include "prio.h"
#include "plstr.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/htmlparser/src/nsWellFormedDTD.cpp b/mozilla/htmlparser/src/nsWellFormedDTD.cpp
index dd371933f35..59feff06562 100644
--- a/mozilla/htmlparser/src/nsWellFormedDTD.cpp
+++ b/mozilla/htmlparser/src/nsWellFormedDTD.cpp
@@ -47,9 +47,6 @@
#include "prio.h"
#include "plstr.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
#include "nsSpecialSystemDirectory.h"
diff --git a/mozilla/parser/htmlparser/src/CNavDTD.cpp b/mozilla/parser/htmlparser/src/CNavDTD.cpp
index aac31b3c452..b2e2a5191f3 100644
--- a/mozilla/parser/htmlparser/src/CNavDTD.cpp
+++ b/mozilla/parser/htmlparser/src/CNavDTD.cpp
@@ -51,9 +51,6 @@
#include "nsHTMLEntities.h"
#include "nsLinebreakConverter.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/parser/htmlparser/src/COtherDTD.cpp b/mozilla/parser/htmlparser/src/COtherDTD.cpp
index b709d184eb3..fb1c1e14876 100644
--- a/mozilla/parser/htmlparser/src/COtherDTD.cpp
+++ b/mozilla/parser/htmlparser/src/COtherDTD.cpp
@@ -51,9 +51,6 @@
#include "nsHTMLEntities.h"
#include "nsLinebreakConverter.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/parser/htmlparser/src/CRtfDTD.cpp b/mozilla/parser/htmlparser/src/CRtfDTD.cpp
index 958621066be..f305743d2e5 100644
--- a/mozilla/parser/htmlparser/src/CRtfDTD.cpp
+++ b/mozilla/parser/htmlparser/src/CRtfDTD.cpp
@@ -45,9 +45,6 @@
#include "plstr.h"
#include "nsDebug.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/parser/htmlparser/src/SelfTest.cpp b/mozilla/parser/htmlparser/src/SelfTest.cpp
index e91ae283e1e..7fbbfaebecc 100644
--- a/mozilla/parser/htmlparser/src/SelfTest.cpp
+++ b/mozilla/parser/htmlparser/src/SelfTest.cpp
@@ -23,7 +23,6 @@
//Testing stream crap...
-#include
#include
#include
diff --git a/mozilla/parser/htmlparser/src/nsDTDUtils.cpp b/mozilla/parser/htmlparser/src/nsDTDUtils.cpp
index 6a0de02ba10..97ea6e7c247 100644
--- a/mozilla/parser/htmlparser/src/nsDTDUtils.cpp
+++ b/mozilla/parser/htmlparser/src/nsDTDUtils.cpp
@@ -929,10 +929,13 @@ nsDeque* nsObserverTopic::GetObserversForTag(eHTMLTags aTag) {
}
void nsObserverTopic::RegisterObserverForTag(nsIElementObserver *anObserver,eHTMLTags aTag) {
- if(mObservers[aTag] == nsnull) {
- mObservers[aTag] = new nsDeque(0);
+ if(anObserver) {
+ if(mObservers[aTag] == nsnull) {
+ mObservers[aTag] = new nsDeque(0);
+ }
+ NS_ADDREF(anObserver);
+ mObservers[aTag]->Push(anObserver);
}
- mObservers[aTag]->Push(anObserver);
}
diff --git a/mozilla/parser/htmlparser/src/nsExpatDTD.cpp b/mozilla/parser/htmlparser/src/nsExpatDTD.cpp
index 09ec32d7bfd..3f1a67332c7 100644
--- a/mozilla/parser/htmlparser/src/nsExpatDTD.cpp
+++ b/mozilla/parser/htmlparser/src/nsExpatDTD.cpp
@@ -47,9 +47,6 @@
#include "plstr.h"
#include "prlog.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp
index 085324b0474..1f987bba792 100644
--- a/mozilla/parser/htmlparser/src/nsParser.cpp
+++ b/mozilla/parser/htmlparser/src/nsParser.cpp
@@ -1594,8 +1594,9 @@ theContext->mTransferBufferSize;
theContext->mScanner->Append(theContext->mTransferBuffer,theNumRead);
#if 0
- int dump=0;
+ static int dump=0;
if(dump) {
+ theContext->mTransferBuffer[theNumRead]=0;
printf("\n-----------------\n%s",theContext->mTransferBuffer);
}
#endif
diff --git a/mozilla/parser/htmlparser/src/nsValidDTD.cpp b/mozilla/parser/htmlparser/src/nsValidDTD.cpp
index c14036eeb51..af5bb863892 100644
--- a/mozilla/parser/htmlparser/src/nsValidDTD.cpp
+++ b/mozilla/parser/htmlparser/src/nsValidDTD.cpp
@@ -48,9 +48,6 @@
#include "prio.h"
#include "plstr.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/parser/htmlparser/src/nsViewSourceHTML.cpp b/mozilla/parser/htmlparser/src/nsViewSourceHTML.cpp
index 7e1be349c9b..f9d3ce348a2 100644
--- a/mozilla/parser/htmlparser/src/nsViewSourceHTML.cpp
+++ b/mozilla/parser/htmlparser/src/nsViewSourceHTML.cpp
@@ -61,9 +61,6 @@
#include "prio.h"
#include "plstr.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
diff --git a/mozilla/parser/htmlparser/src/nsWellFormedDTD.cpp b/mozilla/parser/htmlparser/src/nsWellFormedDTD.cpp
index dd371933f35..59feff06562 100644
--- a/mozilla/parser/htmlparser/src/nsWellFormedDTD.cpp
+++ b/mozilla/parser/htmlparser/src/nsWellFormedDTD.cpp
@@ -47,9 +47,6 @@
#include "prio.h"
#include "plstr.h"
-#ifdef XP_PC
-#include //this is here for debug reasons...
-#endif
#include "prmem.h"
#include "nsSpecialSystemDirectory.h"