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

Unified Diff: content/common/host_shared_bitmap_manager.cc

Issue 604583002: Fix race in HostSharedBitmapManager::AllocatedBitmapCount (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 | « content/common/host_shared_bitmap_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/host_shared_bitmap_manager.cc
diff --git a/content/common/host_shared_bitmap_manager.cc b/content/common/host_shared_bitmap_manager.cc
index ac1478fe5ea07dc244ff178382418e611bfcd95d..66f721552f95614cd78cc23ccd230da16de6e7fe 100644
--- a/content/common/host_shared_bitmap_manager.cc
+++ b/content/common/host_shared_bitmap_manager.cc
@@ -187,6 +187,11 @@ void HostSharedBitmapManager::ProcessRemoved(
process_map_.erase(proc_it);
}
+size_t HostSharedBitmapManager::AllocatedBitmapCount() const {
+ base::AutoLock lock(lock_);
+ return handle_map_.size();
+}
+
void HostSharedBitmapManager::FreeSharedMemoryFromMap(
cc::SharedBitmap* bitmap) {
base::AutoLock lock(lock_);
« no previous file with comments | « content/common/host_shared_bitmap_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698