diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp index 2ef3c91bb90c..d172df765033 100644 --- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -129,9 +129,6 @@ class HTMLContentSink; * Don't bother adding new stuff in this file. */ class HTMLContentSink : public nsContentSink, -#ifdef DEBUG - public nsIDebugDumpContent, -#endif public nsIHTMLContentSink { public: @@ -165,11 +162,6 @@ public: NS_IMETHOD OpenContainer(ElementType aNodeType); NS_IMETHOD CloseContainer(ElementType aTag); -#ifdef DEBUG - // nsIDebugDumpContent - NS_IMETHOD DumpContentModel(); -#endif - protected: already_AddRefed CreateContentObject(nsHTMLTag aNodeType); @@ -1094,9 +1086,6 @@ NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLContentSink) NS_INTERFACE_TABLE_BEGIN NS_INTERFACE_TABLE_ENTRY(HTMLContentSink, nsIContentSink) NS_INTERFACE_TABLE_ENTRY(HTMLContentSink, nsIHTMLContentSink) -#if DEBUG - NS_INTERFACE_TABLE_ENTRY(HTMLContentSink, nsIDebugDumpContent) -#endif NS_INTERFACE_TABLE_END NS_INTERFACE_TABLE_TAIL_INHERITING(nsContentSink) @@ -1655,40 +1644,3 @@ HTMLContentSink::IsScriptExecuting() { return IsScriptExecutingImpl(); } - -#ifdef DEBUG -/** - * This will dump content model into the output file. - * - * @update harishd 05/25/00 - * @param - * @return NS_OK all went well, error on failure - */ - -NS_IMETHODIMP -HTMLContentSink::DumpContentModel() -{ - FILE* out = ::fopen("rtest_html.txt", "a"); - if (out) { - if (mDocument) { - Element* root = mDocument->GetRootElement(); - if (root) { - if (mDocumentURI) { - nsAutoCString buf; - mDocumentURI->GetSpec(buf); - fputs(buf.get(), out); - } - - fputs(";", out); - root->DumpContent(out, 0, false); - fputs(";\n", out); - } - } - - fclose(out); - } - - return NS_OK; -} -#endif - diff --git a/parser/htmlparser/public/nsIParser.h b/parser/htmlparser/public/nsIParser.h index 62ec3520bbc5..b5bfc469365a 100644 --- a/parser/htmlparser/public/nsIParser.h +++ b/parser/htmlparser/public/nsIParser.h @@ -58,23 +58,6 @@ enum eParserDocType { enum eStreamState {eNone,eOnStart,eOnDataAvail,eOnStop}; -/** - * FOR DEBUG PURPOSE ONLY - * - * Use this interface to query objects that contain content information. - * Ex. Parser can trigger dump content by querying the sink that has - * access to the content. - * - * @update harishd 05/25/00 - */ -class nsIDebugDumpContent : public nsISupports { -public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEBUG_DUMP_CONTENT_IID) - NS_IMETHOD DumpContentModel()=0; -}; - -NS_DEFINE_STATIC_IID_ACCESSOR(nsIDebugDumpContent, NS_IDEBUG_DUMP_CONTENT_IID) - /** * This GECKO-INTERNAL interface is on track to being REMOVED (or refactored * to the point of being near-unrecognizable). diff --git a/parser/htmlparser/src/nsParser.cpp b/parser/htmlparser/src/nsParser.cpp index 106e33f26bf6..4cea5cc5aad4 100644 --- a/parser/htmlparser/src/nsParser.cpp +++ b/parser/htmlparser/src/nsParser.cpp @@ -162,10 +162,6 @@ void nsParser::Shutdown() NS_IF_RELEASE(sCharsetConverterManager); } -#ifdef DEBUG -static bool gDumpContent=false; -#endif - /** * default constructor */ @@ -182,12 +178,6 @@ nsParser::~nsParser() void nsParser::Initialize(bool aConstructor) { -#ifdef DEBUG - if (!gDumpContent) { - gDumpContent = PR_GetEnv("PARSER_DUMP_CONTENT") != nullptr; - } -#endif - if (aConstructor) { // Raw pointer mParserContext = 0; @@ -215,20 +205,6 @@ nsParser::Initialize(bool aConstructor) void nsParser::Cleanup() { -#ifdef DEBUG - if (gDumpContent) { - if (mSink) { - // Sink (HTMLContentSink at this time) supports nsIDebugDumpContent - // interface. We can get to the content model through the sink. - nsresult result = NS_OK; - nsCOMPtr trigger = do_QueryInterface(mSink, &result); - if (NS_SUCCEEDED(result)) { - trigger->DumpContentModel(); - } - } - } -#endif - #ifdef DEBUG if (mParserContext && mParserContext->mPrevContext) { NS_WARNING("Extra parser contexts still on the parser stack");