diff --git a/mozilla/htmlparser/src/CParserContext.cpp b/mozilla/htmlparser/src/CParserContext.cpp
index a5256681679..b7d352696f0 100644
--- a/mozilla/htmlparser/src/CParserContext.cpp
+++ b/mozilla/htmlparser/src/CParserContext.cpp
@@ -95,7 +95,6 @@ CParserContext::CParserContext(const CParserContext &aContext) :
mMultipart=aContext.mMultipart;
mContextType=aContext.mContextType;
mCopyUnused;
- mRefCount=2;
}
@@ -108,14 +107,11 @@ CParserContext::~CParserContext(){
MOZ_COUNT_DTOR(CParserContext);
- mRefCount--;
- if(0==mRefCount) {
- if(mScanner)
- delete mScanner;
+ if(mScanner)
+ delete mScanner;
- if(mTransferBuffer)
- delete [] mTransferBuffer;
- }
+ if(mTransferBuffer)
+ delete [] mTransferBuffer;
NS_IF_RELEASE(mDTD);
diff --git a/mozilla/htmlparser/src/CParserContext.h b/mozilla/htmlparser/src/CParserContext.h
index 45fc701b489..65410eff9fa 100644
--- a/mozilla/htmlparser/src/CParserContext.h
+++ b/mozilla/htmlparser/src/CParserContext.h
@@ -68,7 +68,7 @@ public:
PRBool mMultipart;
eContextType mContextType;
eAutoDetectResult mAutoDetectStatus;
- PRInt32 mRefCount;
+
nsString mSourceType;
diff --git a/mozilla/parser/htmlparser/src/CParserContext.cpp b/mozilla/parser/htmlparser/src/CParserContext.cpp
index a5256681679..b7d352696f0 100644
--- a/mozilla/parser/htmlparser/src/CParserContext.cpp
+++ b/mozilla/parser/htmlparser/src/CParserContext.cpp
@@ -95,7 +95,6 @@ CParserContext::CParserContext(const CParserContext &aContext) :
mMultipart=aContext.mMultipart;
mContextType=aContext.mContextType;
mCopyUnused;
- mRefCount=2;
}
@@ -108,14 +107,11 @@ CParserContext::~CParserContext(){
MOZ_COUNT_DTOR(CParserContext);
- mRefCount--;
- if(0==mRefCount) {
- if(mScanner)
- delete mScanner;
+ if(mScanner)
+ delete mScanner;
- if(mTransferBuffer)
- delete [] mTransferBuffer;
- }
+ if(mTransferBuffer)
+ delete [] mTransferBuffer;
NS_IF_RELEASE(mDTD);
diff --git a/mozilla/parser/htmlparser/src/CParserContext.h b/mozilla/parser/htmlparser/src/CParserContext.h
index 45fc701b489..65410eff9fa 100644
--- a/mozilla/parser/htmlparser/src/CParserContext.h
+++ b/mozilla/parser/htmlparser/src/CParserContext.h
@@ -68,7 +68,7 @@ public:
PRBool mMultipart;
eContextType mContextType;
eAutoDetectResult mAutoDetectStatus;
- PRInt32 mRefCount;
+
nsString mSourceType;