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

Unified Diff: content/common/host_shared_bitmap_manager.h

Issue 1464383004: Add lock around modification of HostSharedBitmapManagerClient::owned_bitmaps_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | content/common/host_shared_bitmap_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/host_shared_bitmap_manager.h
diff --git a/content/common/host_shared_bitmap_manager.h b/content/common/host_shared_bitmap_manager.h
index b14bb0b3f520afa30791cad2dd435d0b46011e1f..5ff8212a062dc60bc9389e11e81fa46cabf5094b 100644
--- a/content/common/host_shared_bitmap_manager.h
+++ b/content/common/host_shared_bitmap_manager.h
@@ -51,6 +51,9 @@ class CONTENT_EXPORT HostSharedBitmapManagerClient {
private:
HostSharedBitmapManager* manager_;
+
+ // Lock must be held around access to owned_bitmaps_.
+ base::Lock lock_;
base::hash_set<cc::SharedBitmapId> owned_bitmaps_;
DISALLOW_COPY_AND_ASSIGN(HostSharedBitmapManagerClient);
@@ -88,7 +91,7 @@ class CONTENT_EXPORT HostSharedBitmapManager
size_t buffer_size,
const cc::SharedBitmapId& id,
base::SharedMemoryHandle* shared_memory_handle);
- void ChildAllocatedSharedBitmap(size_t buffer_size,
+ bool ChildAllocatedSharedBitmap(size_t buffer_size,
const base::SharedMemoryHandle& handle,
base::ProcessHandle process_handle,
const cc::SharedBitmapId& id);
« no previous file with comments | « no previous file | content/common/host_shared_bitmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698