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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 2905833003: Make Image::image_observer_ WeakPersistent (Closed)
Patch Set: Reflect comments Created 3 years, 7 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 | « third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/Image.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index faecfa12c17009613292e2f9ba34fe75877fa299..b3e30393625359732fc2ccdc13bc52726a25714f 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -229,9 +229,11 @@ class PLATFORM_EXPORT Image : public ThreadSafeRefCounted<Image> {
// TODO(Oilpan): consider having Image on the Oilpan heap and
// turn this into a Member<>.
//
- // The observer (an ImageResourceContent) is an untraced member, with the
- // ImageResourceContent being responsible for clearing itself out.
- UntracedMember<ImageObserver> image_observer_;
+ // The observer (an ImageResourceContent) is responsible for clearing
+ // itself out when it switches to another Image.
+ // When the ImageResourceContent is garbage collected while Image is still
+ // alive, |image_observer_| is cleared by WeakPersistent mechanism.
+ WeakPersistent<ImageObserver> image_observer_;
PaintImage::Id stable_image_id_;
};
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698