| Index: cc/resources/resource_pool.cc
 | 
| diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
 | 
| index 5a6654e001ba687af6621f37933e8c70a496a9d8..8bba2cbf18577570fe293e3c7509db46c42615f9 100644
 | 
| --- a/cc/resources/resource_pool.cc
 | 
| +++ b/cc/resources/resource_pool.cc
 | 
| @@ -205,10 +205,13 @@
 | 
|    --resource_count_;
 | 
|  }
 | 
|  
 | 
| -void ResourcePool::CheckBusyResources() {
 | 
| +void ResourcePool::CheckBusyResources(bool wait_if_needed) {
 | 
|    for (size_t i = 0; i < busy_resources_.size();) {
 | 
|      ResourceDeque::iterator it(busy_resources_.begin() + i);
 | 
|      PoolResource* resource = *it;
 | 
| +
 | 
| +    if (wait_if_needed)
 | 
| +      resource_provider_->WaitReadLockIfNeeded(resource->id());
 | 
|  
 | 
|      if (resource_provider_->CanLockForWrite(resource->id())) {
 | 
|        DidFinishUsingResource(busy_resources_.take(it));
 | 
| 
 |