Index: third_party/WebKit/Source/platform/loader/fetch/Resource.h |
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.h b/third_party/WebKit/Source/platform/loader/fetch/Resource.h |
index 537d295485a5693ab14c937d77bd04f72eb61a1c..8ce429ce9634e33f3309569b7ad403c6af716505 100644 |
--- a/third_party/WebKit/Source/platform/loader/fetch/Resource.h |
+++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.h |
@@ -307,6 +307,11 @@ class PLATFORM_EXPORT Resource : public GarbageCollectedFinalized<Resource>, |
} |
virtual bool CanReuse(const FetchParameters&) const { return true; } |
+ virtual bool IsShareable() const { |
+ // MemoryCache works only on the main thread, so we don't add a resource |
+ // on another thread. |
+ return IsMainThread() && options_.data_buffering_policy != kDoNotBufferData; |
+ } |
// If cache-aware loading is activated, this callback is called when the first |
// disk-cache-only request failed due to cache miss. After this callback, |