Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp b/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp |
| index e047a0c2ca5846dbee0b0c09f746bd78051ada69..00da86509e5ab2f5879ff49735b19f13191d4c0d 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp |
| @@ -54,6 +54,14 @@ void ThreadSafeDataTransport::setData(SharedBuffer* buffer, bool allDataReceived |
| } |
| MutexLocker locker(m_mutex); |
| + if (m_allDataReceived && newBufferQueue.size()) { |
|
chrishtr
2015/12/03 17:51:51
Is this code reachable in one of your testcases? N
aleksandar.stojiljkovic
2015/12/03 18:04:14
No, it is not reachable and it mustn't be. It wasn
chrishtr
2015/12/03 18:32:00
If it is not something that can happen, just put i
aleksandar.stojiljkovic
2015/12/03 21:17:09
Done.
|
| + // This prevents from unexisting use case now - if all data was previously |
| + // received, don't append more to it. |
| + ASSERT(false); |
| + newBufferQueue.clear(); |
| + return; |
| + } |
| + |
| m_newBufferQueue.appendVector(newBufferQueue); |
| newBufferQueue.clear(); |
| m_allDataReceived = allDataReceived; |