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

Unified Diff: Source/WebCore/loader/cache/CachedRawResource.cpp

Issue 11571073: Merge 138174 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 8 years 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 | « Source/WebCore/loader/ResourceLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/loader/cache/CachedRawResource.cpp
===================================================================
--- Source/WebCore/loader/cache/CachedRawResource.cpp (revision 138210)
+++ Source/WebCore/loader/cache/CachedRawResource.cpp (working copy)
@@ -56,19 +56,26 @@
incrementalData = data->data() + previousDataLength;
incrementalDataLength = data->size() - previousDataLength;
}
-
+
if (m_options.shouldBufferData == BufferData) {
if (data)
setEncodedSize(data->size());
m_data = data;
}
-
+
+ DataBufferingPolicy dataBufferingPolicy = m_options.shouldBufferData;
if (incrementalDataLength) {
CachedResourceClientWalker<CachedRawResourceClient> w(m_clients);
while (CachedRawResourceClient* c = w.next())
c->dataReceived(this, incrementalData, incrementalDataLength);
}
CachedResource::data(m_data, allDataReceived);
+
+ if (dataBufferingPolicy == BufferData && m_options.shouldBufferData == DoNotBufferData) {
+ if (m_loader)
+ m_loader->setShouldBufferData(DoNotBufferData);
+ clear();
+ }
}
void CachedRawResource::didAddClient(CachedResourceClient* c)
« no previous file with comments | « Source/WebCore/loader/ResourceLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698