From 3bc6fee424132151b3c5da8f336253091e92b69f Mon Sep 17 00:00:00 2001 From: "harishd%netscape.com" Date: Tue, 12 Sep 2000 21:18:50 +0000 Subject: [PATCH] Removed the hack,in the sink, to limit nesting depth. This now happens in the parser. r=rickg/jst git-svn-id: svn://10.0.0.236/trunk@78904 18797224-902f-48f8-a5cc-f745e15eee43 --- .../html/document/src/nsHTMLContentSink.cpp | 16 ---------------- .../html/document/src/nsHTMLContentSink.cpp | 16 ---------------- 2 files changed, 32 deletions(-) diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index e46eb7327f5..0ddbaa27367 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -477,7 +477,6 @@ public: PRUnichar* mText; PRInt32 mTextLength; PRInt32 mTextSize; - PRInt32 mIgnoredOpenCount; }; //---------------------------------------------------------------------- @@ -1158,7 +1157,6 @@ SinkContext::SinkContext(HTMLContentSink* aSink) mTextSize = 0; mLastTextNode = nsnull; mLastTextNodeSize = 0; - mIgnoredOpenCount = 0; } SinkContext::~SinkContext() @@ -1297,13 +1295,6 @@ SinkContext::OpenContainer(const nsIParserNode& aNode) SINK_TRACE_NODE(SINK_TRACE_CALLS, "SinkContext::OpenContainer", aNode, mStackPos, mSink); - // XXX - Hack to handle stack over flow ( Bug 18480 ) - if (mStackPos > 1000) { - mIgnoredOpenCount++; - return AddLeaf(aNode); - } - // XXX - Hack Ends - nsresult rv; if (mStackPos + 1 > mStackSize) { rv = GrowStack(); @@ -1405,13 +1396,6 @@ SinkContext::CloseContainer(const nsIParserNode& aNode) { nsresult result = NS_OK; - // XXX - Hack to handle stack over flow ( Bug 18480 ) - if (mIgnoredOpenCount) { - mIgnoredOpenCount--; - return NS_OK; - } - // XXX -Hack Ends. - // Flush any collected text content. Release the last text // node to indicate that no more should be added to it. FlushTextAndRelease(); diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index e46eb7327f5..0ddbaa27367 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -477,7 +477,6 @@ public: PRUnichar* mText; PRInt32 mTextLength; PRInt32 mTextSize; - PRInt32 mIgnoredOpenCount; }; //---------------------------------------------------------------------- @@ -1158,7 +1157,6 @@ SinkContext::SinkContext(HTMLContentSink* aSink) mTextSize = 0; mLastTextNode = nsnull; mLastTextNodeSize = 0; - mIgnoredOpenCount = 0; } SinkContext::~SinkContext() @@ -1297,13 +1295,6 @@ SinkContext::OpenContainer(const nsIParserNode& aNode) SINK_TRACE_NODE(SINK_TRACE_CALLS, "SinkContext::OpenContainer", aNode, mStackPos, mSink); - // XXX - Hack to handle stack over flow ( Bug 18480 ) - if (mStackPos > 1000) { - mIgnoredOpenCount++; - return AddLeaf(aNode); - } - // XXX - Hack Ends - nsresult rv; if (mStackPos + 1 > mStackSize) { rv = GrowStack(); @@ -1405,13 +1396,6 @@ SinkContext::CloseContainer(const nsIParserNode& aNode) { nsresult result = NS_OK; - // XXX - Hack to handle stack over flow ( Bug 18480 ) - if (mIgnoredOpenCount) { - mIgnoredOpenCount--; - return NS_OK; - } - // XXX -Hack Ends. - // Flush any collected text content. Release the last text // node to indicate that no more should be added to it. FlushTextAndRelease();