Chromium Code Reviews| Index: Source/core/loader/appcache/ApplicationCache.h |
| diff --git a/Source/core/loader/appcache/ApplicationCache.h b/Source/core/loader/appcache/ApplicationCache.h |
| index 614569a0bc7b035fe3ec327c2d34b9e7e50de250..a7945c59bef9edb1f98557c724ff404919489e5e 100644 |
| --- a/Source/core/loader/appcache/ApplicationCache.h |
| +++ b/Source/core/loader/appcache/ApplicationCache.h |
| @@ -31,6 +31,7 @@ |
| #include "core/events/ThreadLocalEventNames.h" |
| #include "core/loader/appcache/ApplicationCacheHost.h" |
| #include "core/frame/DOMWindowProperty.h" |
| +#include "heap/Handle.h" |
| #include "wtf/Forward.h" |
| #include "wtf/PassRefPtr.h" |
| #include "wtf/RefCounted.h" |
| @@ -41,10 +42,13 @@ class ExceptionState; |
| class LocalFrame; |
| class KURL; |
| -class ApplicationCache FINAL : public ScriptWrappable, public RefCounted<ApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty { |
| - REFCOUNTED_EVENT_TARGET(ApplicationCache); |
| +class ApplicationCache FINAL : public RefCountedWillBeRefCountedGarbageCollected<ApplicationCache>, public ScriptWrappable, public EventTargetWithInlineData, public DOMWindowProperty { |
| + DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<ApplicationCache>); |
| public: |
| - static PassRefPtr<ApplicationCache> create(LocalFrame* frame) { return adoptRef(new ApplicationCache(frame)); } |
| + static PassRefPtrWillBeRawPtr<ApplicationCache> create(LocalFrame* frame) |
| + { |
| + return adoptRefWillBeRefCountedGarbageCollected(new ApplicationCache(frame)); |
| + } |
| virtual ~ApplicationCache() { ASSERT(!m_frame); } |
|
haraken
2014/03/21 14:41:20
Just to confirm: DOMWindowProperty has LocalFrame*
|
| virtual void willDestroyGlobalObjectInFrame() OVERRIDE; |
| @@ -70,6 +74,8 @@ public: |
| static const AtomicString& toEventType(ApplicationCacheHost::EventID); |
| + void trace(Visitor*) { } |
| + |
| private: |
| explicit ApplicationCache(LocalFrame*); |