Index: cc/resources/resource_pool.cc |
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc |
index bb22b796e6be809997b3ee04cb7ee3df3fb3e412..23a62331f9d06db6d2d808b33f52578d7e6e1bde 100644 |
--- a/cc/resources/resource_pool.cc |
+++ b/cc/resources/resource_pool.cc |
@@ -187,11 +187,14 @@ |
delete resource; |
} |
-void ResourcePool::CheckBusyResources() { |
+void ResourcePool::CheckBusyResources(bool wait_if_needed) { |
ResourceList::iterator it = busy_resources_.begin(); |
while (it != busy_resources_.end()) { |
ScopedResource* resource = it->resource; |
+ |
+ if (wait_if_needed) |
+ resource_provider_->WaitReadLockIfNeeded(resource->id()); |
if (resource_provider_->CanLockForWrite(resource->id())) { |
DidFinishUsingResource(resource, it->content_id); |