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

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

Issue 345663002: Check if the parserthread has been shut down before returning it to the ThreadedDataProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index 9dd3684ca179f63005528bae1df2b5f8b21bf85c..f295cf2a99fd72516da16b5e253bfef5a63fcacd 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -85,14 +85,17 @@ public:
// WebThreadedDataReceiver
virtual void acceptData(const char* data, int dataLength) OVERRIDE FINAL
{
- ASSERT(backgroundThread()->isCurrentThread());
+ ASSERT(backgroundThread() && backgroundThread()->isCurrentThread());
if (m_backgroundParser.get())
m_backgroundParser.get()->appendRawBytesFromParserThread(data, dataLength);
}
virtual blink::WebThread* backgroundThread() OVERRIDE FINAL
{
- return &HTMLParserThread::shared()->platformThread();
+ if (HTMLParserThread::shared())
+ return &HTMLParserThread::shared()->platformThread();
+
+ return 0;
}
private:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698