Index: Source/core/loader/ImageLoader.h |
diff --git a/Source/core/loader/ImageLoader.h b/Source/core/loader/ImageLoader.h |
index 1e0cdc426af7bc28729f3a8821b069c885551461..9ab71e6b77e164952294926d71122f5ff50858a4 100644 |
--- a/Source/core/loader/ImageLoader.h |
+++ b/Source/core/loader/ImageLoader.h |
@@ -55,10 +55,11 @@ class RenderImageResource; |
template<typename T> class EventSender; |
typedef EventSender<ImageLoader> ImageEventSender; |
-class ImageLoader : public ImageResourceClient { |
+class ImageLoader : public NoBaseWillBeGarbageCollectedFinalized<ImageLoader>, public ImageResourceClient { |
zerny-chromium
2014/06/10 12:54:28
Nit: FINAL
|
public: |
explicit ImageLoader(Element*); |
virtual ~ImageLoader(); |
+ void trace(Visitor*); |
enum LoadType { |
LoadNormally, |
@@ -133,8 +134,12 @@ private: |
void willRemoveClient(ImageLoaderClient&); |
- Element* m_element; |
+ RawPtrWillBeMember<Element> m_element; |
ResourcePtr<ImageResource> m_image; |
+ // FIXME: Oilpan: We might be able to remove this Persistent hack when |
+ // ImageResourceClient is traceable. |
+ GC_PLUGIN_IGNORE("http://crbug.com/353083") |
Mads Ager (chromium)
2014/06/11 06:38:41
I think this persistent should use a separate bug
tkent
2014/06/11 06:58:28
ok, will file new bug.
|
+ RefPtrWillBePersistent<Element> m_keepAlive; |
Mads Ager (chromium)
2014/06/10 12:34:33
I don't think this persistent is doing anything in
haraken
2014/06/10 12:47:59
Good point. I agree that we can remove this Persis
zerny-chromium
2014/06/10 12:54:28
Yes. But this does point at a behavior change. The
haraken
2014/06/10 12:58:11
You're right, but as far as I see, m_element is a
tkent
2014/06/10 23:56:57
Thank you for comments.
If we don't have m_keepAl
Mads Ager (chromium)
2014/06/11 06:35:14
OK, I see. This is needed because the ImageLoader
haraken
2014/06/11 06:45:03
Just a drive-by comment not related to the essence
tkent
2014/06/11 06:58:28
No, Timer is not related to this issue.
As the co
Mads Ager (chromium)
2014/06/11 07:09:15
Thank you Kent. I misunderstood the code. The Time
|
#if ENABLE(OILPAN) |
class ImageLoaderClientRemover { |
public: |
@@ -146,6 +151,9 @@ private: |
ImageLoaderClient& m_client; |
}; |
friend class ImageLoaderClientRemover; |
+ // Oilpan: This ImageLoader object must outlive its clients because they |
+ // need to call ImageLoader::willRemoveClient before they die. |
+ GC_PLUGIN_IGNORE("http://crbug.com/353083") |
Mads Ager (chromium)
2014/06/10 12:34:33
Why does not map have to be a PersistentHeapHashMa
Mads Ager (chromium)
2014/06/10 12:37:45
Sorry, that should be: why does /the/ map have to
Mads Ager (chromium)
2014/06/10 12:44:51
Oh, is that the point here? This persistent makes
haraken
2014/06/10 12:47:59
The problem is that the weak processing does not h
Mads Ager (chromium)
2014/06/10 12:54:39
The weak processing doesn't happen if it is not pe
|
PersistentHeapHashMap<WeakMember<ImageLoaderClient>, OwnPtr<ImageLoaderClientRemover> > m_clients; |
#else |
HashSet<ImageLoaderClient*> m_clients; |