Commit dbe9dd50 authored by oysteine@chromium.org's avatar oysteine@chromium.org

The WebThreadedDataReceiver will now check if the parserthread is still alive...

The WebThreadedDataReceiver will now check if the parserthread is still alive before returning it to the ThreadedDataProvider

This fixes a crash when a renderer is shut down while a request is still alive, due to the ResourceDispatcher being shut down after Blink is.

R=abarth
BUG=386383

Review URL: https://codereview.chromium.org/345663002

git-svn-id: svn://svn.chromium.org/blink/trunk@176487 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8c44726b
...@@ -85,14 +85,17 @@ public: ...@@ -85,14 +85,17 @@ public:
// WebThreadedDataReceiver // WebThreadedDataReceiver
virtual void acceptData(const char* data, int dataLength) OVERRIDE FINAL virtual void acceptData(const char* data, int dataLength) OVERRIDE FINAL
{ {
ASSERT(backgroundThread()->isCurrentThread()); ASSERT(backgroundThread() && backgroundThread()->isCurrentThread());
if (m_backgroundParser.get()) if (m_backgroundParser.get())
m_backgroundParser.get()->appendRawBytesFromParserThread(data, dataLength); m_backgroundParser.get()->appendRawBytesFromParserThread(data, dataLength);
} }
virtual blink::WebThread* backgroundThread() OVERRIDE FINAL virtual blink::WebThread* backgroundThread() OVERRIDE FINAL
{ {
return &HTMLParserThread::shared()->platformThread(); if (HTMLParserThread::shared())
return &HTMLParserThread::shared()->platformThread();
return 0;
} }
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment