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

Unified Diff: Source/core/loader/DocumentWriter.cpp

Issue 473203002: DocumentParser should flush itself on finish (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: needs finish event when stopped Created 6 years, 4 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/html/parser/HTMLDocumentParser.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/DocumentWriter.cpp
diff --git a/Source/core/loader/DocumentWriter.cpp b/Source/core/loader/DocumentWriter.cpp
index 86f1eff6e64ab056bc8eef05a85cc1aa3e0fff68..6aa5acbd902aa8b41f36508709a207b0b7843341 100644
--- a/Source/core/loader/DocumentWriter.cpp
+++ b/Source/core/loader/DocumentWriter.cpp
@@ -115,13 +115,9 @@ void DocumentWriter::end()
OwnPtr<TextResourceDecoder> decoder = m_decoderBuilder.buildFor(m_document);
m_parser->setDecoder(decoder.release());
}
- // flush() can result replacing DocumentLoader::m_writer.
- RefPtrWillBeRawPtr<DocumentWriter> protectingThis(this);
- m_parser->flush();
-
- if (!m_parser)
- return;
+ // finish() can result replacing DocumentLoader::m_writer.
+ RefPtrWillBeRawPtr<DocumentWriter> protectingThis(this);
m_parser->finish();
m_parser = nullptr;
m_document = nullptr;
« no previous file with comments | « Source/core/html/parser/HTMLDocumentParser.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698