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

Unified Diff: cc/layers/delegated_frame_resource_collection.h

Issue 47703005: Fix DelegatedFrameResourceCollection thread safety (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | « cc/cc_tests.gyp ('k') | cc/layers/delegated_frame_resource_collection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/delegated_frame_resource_collection.h
diff --git a/cc/layers/delegated_frame_resource_collection.h b/cc/layers/delegated_frame_resource_collection.h
index 68ee11a1c1f5251ba592b836942e0f1f020630e1..9a5d336749bb610580bcc552b95800d55c76c86d 100644
--- a/cc/layers/delegated_frame_resource_collection.h
+++ b/cc/layers/delegated_frame_resource_collection.h
@@ -7,6 +7,7 @@
#include "base/containers/hash_tables.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "cc/base/cc_export.h"
#include "cc/resources/return_callback.h"
@@ -46,10 +47,6 @@ class CC_EXPORT DelegatedFrameResourceCollection
friend class base::RefCounted<DelegatedFrameResourceCollection>;
~DelegatedFrameResourceCollection();
- void UnrefResourcesOnImplThread(
- scoped_refptr<BlockingTaskRunner> main_thread_runner,
- const ReturnedResourceArray& returned);
-
DelegatedFrameResourceCollectionClient* client_;
scoped_refptr<BlockingTaskRunner> main_thread_runner_;
@@ -64,6 +61,7 @@ class CC_EXPORT DelegatedFrameResourceCollection
ResourceIdRefCountMap resource_id_ref_count_map_;
base::ThreadChecker main_thread_checker_;
+ base::WeakPtrFactory<DelegatedFrameResourceCollection> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(DelegatedFrameResourceCollection);
};
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layers/delegated_frame_resource_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698