Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(941)

Unified Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 276733002: Convert XMLDocumentParser code to Use more reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/xml/parser/XMLDocumentParser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/parser/XMLDocumentParser.cpp
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
index 1d27a203204a16b5e6d485bfb50e1547868882c1..9646d0e6143840060e6c3c7e65cc998c00582bd2 100644
--- a/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -739,11 +739,11 @@ bool XMLDocumentParser::supportsXMLVersion(const String& version)
return version == "1.0";
}
-XMLDocumentParser::XMLDocumentParser(Document* document, FrameView* frameView)
+XMLDocumentParser::XMLDocumentParser(Document& document, FrameView* frameView)
: ScriptableDocumentParser(document)
, m_view(frameView)
, m_context(nullptr)
- , m_currentNode(document)
+ , m_currentNode(&document)
, m_isCurrentlyParsing8BitChunk(false)
, m_sawError(false)
, m_sawCSS(false)
@@ -753,18 +753,18 @@ XMLDocumentParser::XMLDocumentParser(Document* document, FrameView* frameView)
, m_parserPaused(false)
, m_requestingScript(false)
, m_finishCalled(false)
- , m_xmlErrors(document)
+ , m_xmlErrors(&document)
, m_pendingScript(0)
, m_scriptStartPosition(TextPosition::belowRangePosition())
, m_parsingFragment(false)
{
// This is XML being used as a document resource.
- if (frameView && document->isXMLDocument())
- UseCounter::count(*document, UseCounter::XMLDocument);
+ if (frameView && document.isXMLDocument())
+ UseCounter::count(document, UseCounter::XMLDocument);
}
XMLDocumentParser::XMLDocumentParser(DocumentFragment* fragment, Element* parentElement, ParserContentPolicy parserContentPolicy)
- : ScriptableDocumentParser(&fragment->document(), parserContentPolicy)
+ : ScriptableDocumentParser(fragment->document(), parserContentPolicy)
, m_view(0)
, m_context(nullptr)
, m_currentNode(fragment)
« no previous file with comments | « Source/core/xml/parser/XMLDocumentParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698