diff --git a/parser/html/nsHtml5Parser.cpp b/parser/html/nsHtml5Parser.cpp
index af8bf753e001..922388ff803a 100644
--- a/parser/html/nsHtml5Parser.cpp
+++ b/parser/html/nsHtml5Parser.cpp
@@ -104,8 +104,7 @@ void nsHtml5Parser::SetDocumentCharset(NotNull aEncoding,
(nsCharsetSource)aCharsetSource);
}
-NS_IMETHODIMP
-nsHtml5Parser::GetChannel(nsIChannel** aChannel) {
+nsresult nsHtml5Parser::GetChannel(nsIChannel** aChannel) {
if (GetStreamParser()) {
return GetStreamParser()->GetChannel(aChannel);
} else {
diff --git a/parser/html/nsHtml5Parser.h b/parser/html/nsHtml5Parser.h
index b79390bcea76..7a2a97841da8 100644
--- a/parser/html/nsHtml5Parser.h
+++ b/parser/html/nsHtml5Parser.h
@@ -75,7 +75,7 @@ class nsHtml5Parser final : public nsIParser, public nsSupportsWeakReference {
* @param aChannel out param that will contain the result
* @return NS_OK if successful or NS_NOT_AVAILABLE if not
*/
- NS_IMETHOD GetChannel(nsIChannel** aChannel) override;
+ nsresult GetChannel(nsIChannel** aChannel);
/**
* Return |this| for backwards compat.
diff --git a/parser/htmlparser/nsIParser.h b/parser/htmlparser/nsIParser.h
index 687b55ba393a..0441c6020da2 100644
--- a/parser/htmlparser/nsIParser.h
+++ b/parser/htmlparser/nsIParser.h
@@ -109,14 +109,6 @@ class nsIParser : public nsParserBase {
int32_t aSource,
bool aForceAutoDetection = false) = 0;
- /**
- * Get the channel associated with this parser
- * @update harishd,gagan 07/17/01
- * @param aChannel out param that will contain the result
- * @return NS_OK if successful
- */
- NS_IMETHOD GetChannel(nsIChannel** aChannel) override = 0;
-
/**
* Get the DTD associated with this parser
* @update vidur 9/29/99
diff --git a/parser/htmlparser/nsParser.cpp b/parser/htmlparser/nsParser.cpp
index 22358e3a95ec..8b982ffed3ec 100644
--- a/parser/htmlparser/nsParser.cpp
+++ b/parser/htmlparser/nsParser.cpp
@@ -1419,21 +1419,6 @@ nsresult nsParser::Tokenize(bool aIsFinalChunk) {
return result;
}
-/**
- * Get the channel associated with this parser
- *
- * @param aChannel out param that will contain the result
- * @return NS_OK if successful
- */
-NS_IMETHODIMP
-nsParser::GetChannel(nsIChannel** aChannel) {
- nsresult result = NS_ERROR_NOT_AVAILABLE;
- if (mParserContext && mParserContext->mRequest) {
- result = CallQueryInterface(mParserContext->mRequest, aChannel);
- }
- return result;
-}
-
/**
* Get the DTD associated with this parser
*/
diff --git a/parser/htmlparser/nsParser.h b/parser/htmlparser/nsParser.h
index 0fb1e1cd2c1f..246cfc03c6ed 100644
--- a/parser/htmlparser/nsParser.h
+++ b/parser/htmlparser/nsParser.h
@@ -212,14 +212,6 @@ class nsParser final : public nsIParser,
CParserContext* PopContext();
CParserContext* PeekContext() { return mParserContext; }
- /**
- * Get the channel associated with this parser
- * @update harishd,gagan 07/17/01
- * @param aChannel out param that will contain the result
- * @return NS_OK if successful
- */
- NS_IMETHOD GetChannel(nsIChannel** aChannel) override;
-
/**
* Get the DTD associated with this parser
* @update vidur 9/29/99
diff --git a/parser/htmlparser/nsParserBase.h b/parser/htmlparser/nsParserBase.h
index f1518abef688..13c8883d4c84 100644
--- a/parser/htmlparser/nsParserBase.h
+++ b/parser/htmlparser/nsParserBase.h
@@ -10,10 +10,6 @@
class nsParserBase : public nsISupports {
public:
NS_IMETHOD_(bool) IsParserEnabled() { return true; }
- NS_IMETHOD GetChannel(nsIChannel** aChannel) {
- *aChannel = nullptr;
- return NS_OK;
- }
};
#endif // nsParserBase_h_
diff --git a/parser/prototype/PrototypeDocumentParser.h b/parser/prototype/PrototypeDocumentParser.h
index 7d736d2bc56c..526a4b52086a 100644
--- a/parser/prototype/PrototypeDocumentParser.h
+++ b/parser/prototype/PrototypeDocumentParser.h
@@ -58,10 +58,6 @@ class PrototypeDocumentParser final : public nsIParser,
int32_t aSource,
bool aForceAutoDetection) override {}
- NS_IMETHOD GetChannel(nsIChannel** aChannel) override {
- return NS_ERROR_NOT_IMPLEMENTED;
- }
-
NS_IMETHOD GetDTD(nsIDTD** aDTD) override { return NS_ERROR_NOT_IMPLEMENTED; }
virtual nsIStreamListener* GetStreamListener() override;