Bug 1749935 - Create nsParser directly instead of with a CID. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135896
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
#include "nsAttrName.h"
|
||||
|
||||
#include "nsNetCID.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "mozilla/parser/PrototypeDocumentParser.h"
|
||||
#include "mozilla/dom/PrototypeDocumentContentSink.h"
|
||||
#include "nsNameSpaceManager.h"
|
||||
@@ -73,6 +72,7 @@
|
||||
#include "nsIRequest.h"
|
||||
#include "nsHtml5TreeOpExecutor.h"
|
||||
#include "nsHtml5Parser.h"
|
||||
#include "nsParser.h"
|
||||
#include "nsSandboxFlags.h"
|
||||
#include "mozilla/dom/HTMLBodyElement.h"
|
||||
#include "mozilla/dom/HTMLDocumentBinding.h"
|
||||
@@ -95,8 +95,6 @@ using namespace mozilla::dom;
|
||||
|
||||
//#define DEBUG_charset
|
||||
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
|
||||
// ==================================================================
|
||||
// =
|
||||
// ==================================================================
|
||||
@@ -385,8 +383,7 @@ nsresult nsHTMLDocument::StartDocumentLoad(
|
||||
aChannel->GetOriginalURI(getter_AddRefs(originalURI));
|
||||
mParser = new mozilla::parser::PrototypeDocumentParser(originalURI, this);
|
||||
} else {
|
||||
mParser = do_CreateInstance(kCParserCID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mParser = new nsParser();
|
||||
}
|
||||
|
||||
// Look for the parent document. Note that at this point we don't have our
|
||||
|
||||
Reference in New Issue
Block a user