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

Unified Diff: Source/core/html/parser/HTMLDocumentParser.cpp

Issue 521363002: Make XHR use the background HTML parser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address tyoshino-san review / more comments 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
Index: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index 0393a681370b2feae2fe2bb370799479a176539d..190991b79453c74ffd9dac9779efcde939c56ca1 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -743,8 +743,10 @@ void HTMLDocumentParser::startBackgroundParser()
m_backgroundParser = WeakPtr<BackgroundHTMLParser>(reference);
// TODO(oysteine): Disabled due to crbug.com/398076 until a full fix can be implemented.
- if (RuntimeEnabledFeatures::threadedParserDataReceiverEnabled())
- document()->loader()->attachThreadedDataReceiver(adoptPtr(new ParserDataReceiver(m_backgroundParser)));
+ if (RuntimeEnabledFeatures::threadedParserDataReceiverEnabled()) {
+ if (DocumentLoader* loader = document()->loader())
+ loader->attachThreadedDataReceiver(adoptPtr(new ParserDataReceiver(m_backgroundParser)));
+ }
OwnPtr<BackgroundHTMLParser::Configuration> config = adoptPtr(new BackgroundHTMLParser::Configuration);
config->options = m_options;

Powered by Google App Engine
This is Rietveld 408576698