| Index: third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp b/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp
|
| index 7a177ff73251ed868d4a65d5aa6a1581d5f200e1..463ad98ed3b5d60dad4e6ab57de981cafabb2d50 100644
|
| --- a/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp
|
| @@ -107,6 +107,8 @@ void MultipartImageResourceParser::appendData(const char* bytes, size_t size)
|
| m_isParsingHeaders = true;
|
| break;
|
| }
|
| + if (isCancelled())
|
| + return;
|
| }
|
|
|
| // At this point, we should send over any data we have, but keep enough data
|
| @@ -158,14 +160,10 @@ bool MultipartImageResourceParser::parseHeaders()
|
| return false;
|
| m_data.remove(0, end);
|
|
|
| - // To avoid recording every multipart load as a separate visit in
|
| - // the history database, we want to keep track of whether the response
|
| - // is part of a multipart payload. We do want to record the first visit,
|
| - // so we only set isMultipartPayload to true after the first visit.
|
| - response.setIsMultipartPayload(!m_isFirstPart);
|
| + bool isFirstPart = m_isFirstPart;
|
| m_isFirstPart = false;
|
| // Send the response!
|
| - m_client->onePartInMultipartReceived(response.toResourceResponse());
|
| + m_client->onePartInMultipartReceived(response.toResourceResponse(), isFirstPart);
|
|
|
| return true;
|
| }
|
|
|