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

Unified Diff: ui/gfx/image/image.cc

Issue 1004593005: base::RefCounted now DCHECKs when referenced from multiple threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix lots of tests using UnsafeRefCounted. Created 5 years, 9 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
Index: ui/gfx/image/image.cc
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index 170c51465df3f38fa92ab1299a6aeac7845fcf14..8606730c8f23830ce5b4800e105734f9356748fc 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -338,7 +338,8 @@ class ImageRepCocoa : public ImageRep {
// The Storage class acts similarly to the pixels in a SkBitmap: the Image
// class holds a refptr instance of Storage, which in turn holds all the
// ImageReps. This way, the Image can be cheaply copied.
-class ImageStorage : public base::RefCounted<ImageStorage> {
+// TODO(mgiuca): Avoid using UnsafeRefCounted. http://crbug.com/469952.
+class ImageStorage : public base::UnsafeRefCounted<ImageStorage> {
public:
ImageStorage(Image::RepresentationType default_type)
: default_representation_type_(default_type),
@@ -364,7 +365,7 @@ class ImageStorage : public base::RefCounted<ImageStorage> {
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
private:
- friend class base::RefCounted<ImageStorage>;
+ friend class base::UnsafeRefCounted<ImageStorage>;
~ImageStorage() {}

Powered by Google App Engine
This is Rietveld 408576698