Commit ea9794d9 authored by sigbjornf@opera.com's avatar sigbjornf@opera.com

Oilpan: move ApplicationCache to the oilpan heap.

Make this EventTarget-derived object a garbage collected object.

R=haraken@chromium.org
BUG=340522

Review URL: https://codereview.chromium.org/208083003

git-svn-id: svn://svn.chromium.org/blink/trunk@169744 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 39d506e5
...@@ -361,7 +361,7 @@ enum PageshowEventPersistence { ...@@ -361,7 +361,7 @@ enum PageshowEventPersistence {
mutable RefPtrWillBePersistent<Storage> m_sessionStorage; mutable RefPtrWillBePersistent<Storage> m_sessionStorage;
mutable RefPtrWillBePersistent<Storage> m_localStorage; mutable RefPtrWillBePersistent<Storage> m_localStorage;
mutable RefPtr<ApplicationCache> m_applicationCache; mutable RefPtrWillBePersistent<ApplicationCache> m_applicationCache;
mutable RefPtrWillBePersistent<Performance> m_performance; mutable RefPtrWillBePersistent<Performance> m_performance;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "core/events/ThreadLocalEventNames.h" #include "core/events/ThreadLocalEventNames.h"
#include "core/loader/appcache/ApplicationCacheHost.h" #include "core/loader/appcache/ApplicationCacheHost.h"
#include "core/frame/DOMWindowProperty.h" #include "core/frame/DOMWindowProperty.h"
#include "heap/Handle.h"
#include "wtf/Forward.h" #include "wtf/Forward.h"
#include "wtf/PassRefPtr.h" #include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h" #include "wtf/RefCounted.h"
...@@ -41,10 +42,13 @@ class ExceptionState; ...@@ -41,10 +42,13 @@ class ExceptionState;
class LocalFrame; class LocalFrame;
class KURL; class KURL;
class ApplicationCache FINAL : public ScriptWrappable, public RefCounted<ApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty { class ApplicationCache FINAL : public RefCountedWillBeRefCountedGarbageCollected<ApplicationCache>, public ScriptWrappable, public EventTargetWithInlineData, public DOMWindowProperty {
REFCOUNTED_EVENT_TARGET(ApplicationCache); DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<ApplicationCache>);
public: 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); } virtual ~ApplicationCache() { ASSERT(!m_frame); }
virtual void willDestroyGlobalObjectInFrame() OVERRIDE; virtual void willDestroyGlobalObjectInFrame() OVERRIDE;
...@@ -70,6 +74,8 @@ public: ...@@ -70,6 +74,8 @@ public:
static const AtomicString& toEventType(ApplicationCacheHost::EventID); static const AtomicString& toEventType(ApplicationCacheHost::EventID);
void trace(Visitor*) { }
private: private:
explicit ApplicationCache(LocalFrame*); explicit ApplicationCache(LocalFrame*);
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
*/ */
[ [
DoNotCheckConstants DoNotCheckConstants,
WillBeGarbageCollected,
] interface ApplicationCache : EventTarget { ] interface ApplicationCache : EventTarget {
// update status // update status
const unsigned short UNCACHED = 0; const unsigned short UNCACHED = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment