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

Unified Diff: cc/surfaces/surface_resource_holder.cc

Issue 569173007: Always make context current in ViewManager's BitmapUploader, be laxer in SurfaceResourceHolder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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 | « no previous file | mojo/services/public/cpp/view_manager/lib/bitmap_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_resource_holder.cc
diff --git a/cc/surfaces/surface_resource_holder.cc b/cc/surfaces/surface_resource_holder.cc
index d142f7f91b38ee1435cf94f989a355bf757d1823..50d31a584eef0021a28b4fef9a24c2d0205ae79c 100644
--- a/cc/surfaces/surface_resource_holder.cc
+++ b/cc/surfaces/surface_resource_holder.cc
@@ -51,7 +51,8 @@ void SurfaceResourceHolder::UnrefResources(
++it) {
ResourceProvider::ResourceId id = it->id;
ResourceIdCountMap::iterator count_it = resource_id_use_count_map_.find(id);
- DCHECK(count_it != resource_id_use_count_map_.end());
+ if (count_it == resource_id_use_count_map_.end())
+ continue;
ResourceRefs& ref = count_it->second;
ref.refs_holding_resource_alive -= it->count;
if (ref.refs_holding_resource_alive == 0) {
« no previous file with comments | « no previous file | mojo/services/public/cpp/view_manager/lib/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698