| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2009 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // Used to determine whether to immediately initiate the load | 131 // Used to determine whether to immediately initiate the load |
| 132 // or to schedule a microtask. | 132 // or to schedule a microtask. |
| 133 bool shouldLoadImmediately(const KURL&) const; | 133 bool shouldLoadImmediately(const KURL&) const; |
| 134 | 134 |
| 135 void willRemoveClient(ImageLoaderClient&); | 135 void willRemoveClient(ImageLoaderClient&); |
| 136 | 136 |
| 137 RawPtrWillBeMember<Element> m_element; | 137 RawPtrWillBeMember<Element> m_element; |
| 138 ResourcePtr<ImageResource> m_image; | 138 ResourcePtr<ImageResource> m_image; |
| 139 // FIXME: Oilpan: We might be able to remove this Persistent hack when | 139 // FIXME: Oilpan: We might be able to remove this Persistent hack when |
| 140 // ImageResourceClient is traceable. | 140 // ImageResourceClient is traceable. |
| 141 GC_PLUGIN_IGNORE("http://crbug.com/353083") | 141 GC_PLUGIN_IGNORE("http://crbug.com/383741") |
| 142 RefPtrWillBePersistent<Element> m_keepAlive; | 142 RefPtrWillBePersistent<Element> m_keepAlive; |
| 143 #if ENABLE(OILPAN) | 143 #if ENABLE(OILPAN) |
| 144 class ImageLoaderClientRemover { | 144 class ImageLoaderClientRemover { |
| 145 public: | 145 public: |
| 146 ImageLoaderClientRemover(ImageLoader& loader, ImageLoaderClient& client)
: m_loader(loader), m_client(client) { } | 146 ImageLoaderClientRemover(ImageLoader& loader, ImageLoaderClient& client)
: m_loader(loader), m_client(client) { } |
| 147 ~ImageLoaderClientRemover(); | 147 ~ImageLoaderClientRemover(); |
| 148 | 148 |
| 149 private: | 149 private: |
| 150 ImageLoader& m_loader; | 150 ImageLoader& m_loader; |
| 151 ImageLoaderClient& m_client; | 151 ImageLoaderClient& m_client; |
| 152 }; | 152 }; |
| 153 friend class ImageLoaderClientRemover; | 153 friend class ImageLoaderClientRemover; |
| 154 // Oilpan: This ImageLoader object must outlive its clients because they | 154 // Oilpan: This ImageLoader object must outlive its clients because they |
| 155 // need to call ImageLoader::willRemoveClient before they die. | 155 // need to call ImageLoader::willRemoveClient before they |
| 156 GC_PLUGIN_IGNORE("http://crbug.com/353083") | 156 // die. Non-Persistent HeapHashMap doesn't work well because weak processing |
| 157 // for HeapHashMap is not triggered when both of ImageLoader and |
| 158 // ImageLoaderClient are unreachable. |
| 159 GC_PLUGIN_IGNORE("http://crbug.com/383742") |
| 157 PersistentHeapHashMap<WeakMember<ImageLoaderClient>, OwnPtr<ImageLoaderClien
tRemover> > m_clients; | 160 PersistentHeapHashMap<WeakMember<ImageLoaderClient>, OwnPtr<ImageLoaderClien
tRemover> > m_clients; |
| 158 #else | 161 #else |
| 159 HashSet<ImageLoaderClient*> m_clients; | 162 HashSet<ImageLoaderClient*> m_clients; |
| 160 #endif | 163 #endif |
| 161 Timer<ImageLoader> m_derefElementTimer; | 164 Timer<ImageLoader> m_derefElementTimer; |
| 162 AtomicString m_failedLoadURL; | 165 AtomicString m_failedLoadURL; |
| 163 WeakPtr<Task> m_pendingTask; // owned by Microtask | 166 WeakPtr<Task> m_pendingTask; // owned by Microtask |
| 164 OwnPtr<IncrementLoadEventDelayCount> m_delayLoad; | 167 OwnPtr<IncrementLoadEventDelayCount> m_delayLoad; |
| 165 bool m_hasPendingLoadEvent : 1; | 168 bool m_hasPendingLoadEvent : 1; |
| 166 bool m_hasPendingErrorEvent : 1; | 169 bool m_hasPendingErrorEvent : 1; |
| 167 bool m_imageComplete : 1; | 170 bool m_imageComplete : 1; |
| 168 bool m_loadManually : 1; | 171 bool m_loadManually : 1; |
| 169 bool m_elementIsProtected : 1; | 172 bool m_elementIsProtected : 1; |
| 170 unsigned m_highPriorityClientCount; | 173 unsigned m_highPriorityClientCount; |
| 171 }; | 174 }; |
| 172 | 175 |
| 173 } | 176 } |
| 174 | 177 |
| 175 #endif | 178 #endif |
| OLD | NEW |