Commit 63ac1309 authored by akling@apple.com's avatar akling@apple.com

Reduce repetitive EventTarget subclassing.

<https://webkit.org/b/121915>

Reviewed by Antti Koivisto.

Add a EventTargetWithInlineData helper class to EventTarget.h.
It's a simple subclass with an EventTargetData member and FINAL
eventTargetData()/ensureEventTargetData() overrides.

Turns out that this fits almost every use case except Node and
SVGElementInstance.

Inlined most of the FINAL EventTarget overrides since they will
be called on tight pointers by generated bindings code and this
removes the need for virtual dispatch.

Spammed OVERRIDE FINAL as appropriate, we can't make the whole
classes FINAL until bug 121747 is fixed, so added FIXMEs.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f6e96822
2013-09-25 Andreas Kling <akling@apple.com>
Reduce repetitive EventTarget subclassing.
<https://webkit.org/b/121915>
Reviewed by Antti Koivisto.
Add a EventTargetWithInlineData helper class to EventTarget.h.
It's a simple subclass with an EventTargetData member and FINAL
eventTargetData()/ensureEventTargetData() overrides.
Turns out that this fits almost every use case except Node and
SVGElementInstance.
Inlined most of the FINAL EventTarget overrides since they will
be called on tight pointers by generated bindings code and this
removes the need for virtual dispatch.
Spammed OVERRIDE FINAL as appropriate, we can't make the whole
classes FINAL until bug 121747 is fixed, so added FIXMEs.
2013-09-25 Sam White <samuel_white@apple.com>
AX: WebKit doesn't map aria-sort=other on OS X
......@@ -219,16 +219,6 @@ void MediaKeySession::addKeyTimerFired(Timer<MediaKeySession>*)
}
}
EventTargetInterface MediaKeySession::eventTargetInterface() const
{
return MediaKeySessionEventTargetInterfaceType;
}
ScriptExecutionContext* MediaKeySession::scriptExecutionContext() const
{
return ContextDestructionObserver::scriptExecutionContext();
}
}
#endif
......@@ -45,7 +45,8 @@ class MediaKeyError;
class MediaKeys;
class CDMSession;
class MediaKeySession : public RefCounted<MediaKeySession>, public EventTarget, public ContextDestructionObserver {
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
class MediaKeySession : public RefCounted<MediaKeySession>, public EventTargetWithInlineData, public ContextDestructionObserver {
public:
static PassRefPtr<MediaKeySession> create(ScriptExecutionContext*, MediaKeys*, const String& keySystem);
~MediaKeySession();
......@@ -72,8 +73,8 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeyerror);
DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeymessage);
virtual EventTargetInterface eventTargetInterface() const OVERRIDE;
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return MediaKeySessionEventTargetInterfaceType; }
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ContextDestructionObserver::scriptExecutionContext(); }
protected:
MediaKeySession(ScriptExecutionContext*, MediaKeys*, const String& keySystem);
......@@ -99,13 +100,8 @@ protected:
Timer<MediaKeySession> m_addKeyTimer;
private:
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual EventTargetData* eventTargetData() OVERRIDE { return &m_eventTargetData; }
virtual EventTargetData& ensureEventTargetData() OVERRIDE { return m_eventTargetData; }
EventTargetData m_eventTargetData;
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
};
}
......
......@@ -75,11 +75,6 @@ FileWriter::~FileWriter()
stop();
}
EventTargetInterface FileWriter::eventTargetInterface() const
{
return FileWriterEventTargetInterfaceType;
}
bool FileWriter::canSuspend() const
{
// FIXME: It is not currently possible to suspend a FileWriter, so pages with FileWriter can not go into page cache.
......
......@@ -46,7 +46,8 @@ namespace WebCore {
class Blob;
class ScriptExecutionContext;
class FileWriter : public FileWriterBase, public ActiveDOMObject, public EventTarget, public AsyncFileWriterClient {
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
class FileWriter : public FileWriterBase, public ActiveDOMObject, public EventTargetWithInlineData, public AsyncFileWriterClient {
public:
static PassRefPtr<FileWriter> create(ScriptExecutionContext*);
......@@ -69,8 +70,8 @@ public:
void didFail(FileError::ErrorCode);
// EventTarget
virtual EventTargetInterface eventTargetInterface() const;
virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return FileWriterEventTargetInterfaceType; }
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
using RefCounted<FileWriterBase>::ref;
using RefCounted<FileWriterBase>::deref;
......@@ -99,10 +100,8 @@ private:
virtual void stop() OVERRIDE;
// EventTarget
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual EventTargetData* eventTargetData() OVERRIDE { return &m_eventTargetData; }
virtual EventTargetData& ensureEventTargetData() OVERRIDE { return m_eventTargetData; }
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
void completeAbort();
......@@ -115,7 +114,6 @@ private:
void setError(FileError::ErrorCode, ExceptionCode&);
RefPtr<FileError> m_error;
EventTargetData m_eventTargetData;
ReadyState m_readyState;
Operation m_operationInProgress;
Operation m_queuedOperation;
......
......@@ -351,7 +351,7 @@ bool IDBDatabase::hasPendingActivity() const
{
// The script wrapper must not be collected before the object is closed or
// we can't fire a "versionchange" event to let script manually close the connection.
return !m_closePending && !m_eventTargetData.eventListenerMap.isEmpty() && !m_contextStopped;
return !m_closePending && !ensureEventTargetData().eventListenerMap.isEmpty() && !m_contextStopped;
}
void IDBDatabase::stop()
......@@ -362,26 +362,6 @@ void IDBDatabase::stop()
m_contextStopped = true;
}
EventTargetInterface IDBDatabase::eventTargetInterface() const
{
return IDBDatabaseEventTargetInterfaceType;
}
ScriptExecutionContext* IDBDatabase::scriptExecutionContext() const
{
return ActiveDOMObject::scriptExecutionContext();
}
EventTargetData* IDBDatabase::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData& IDBDatabase::ensureEventTargetData()
{
return m_eventTargetData;
}
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
......@@ -49,7 +49,8 @@ class ScriptExecutionContext;
typedef int ExceptionCode;
class IDBDatabase : public RefCounted<IDBDatabase>, public ScriptWrappable, public EventTarget, public ActiveDOMObject {
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
class IDBDatabase : public RefCounted<IDBDatabase>, public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject {
public:
static PassRefPtr<IDBDatabase> create(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackendInterface>, PassRefPtr<IDBDatabaseCallbacks>);
~IDBDatabase();
......@@ -84,8 +85,8 @@ public:
virtual bool hasPendingActivity() const OVERRIDE;
// EventTarget
virtual EventTargetInterface eventTargetInterface() const;
virtual ScriptExecutionContext* scriptExecutionContext() const;
virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return IDBDatabaseEventTargetInterfaceType; }
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
bool isClosePending() const { return m_closePending; }
void forceClose();
......@@ -115,10 +116,8 @@ private:
virtual void stop() OVERRIDE;
// EventTarget
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData& ensureEventTargetData() OVERRIDE;
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
void closeConnection();
......@@ -131,8 +130,6 @@ private:
bool m_closePending;
bool m_contextStopped;
EventTargetData m_eventTargetData;
// Keep track of the versionchange events waiting to be fired on this
// database so that we can cancel them if the database closes.
Vector<RefPtr<Event> > m_enqueuedEvents;
......
......@@ -439,11 +439,6 @@ EventTargetInterface IDBRequest::eventTargetInterface() const
return IDBRequestEventTargetInterfaceType;
}
ScriptExecutionContext* IDBRequest::scriptExecutionContext() const
{
return ActiveDOMObject::scriptExecutionContext();
}
bool IDBRequest::dispatchEvent(PassRefPtr<Event> event)
{
IDB_TRACE("IDBRequest::dispatchEvent");
......@@ -558,16 +553,6 @@ void IDBRequest::enqueueEvent(PassRefPtr<Event> event)
m_enqueuedEvents.append(event);
}
EventTargetData* IDBRequest::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData& IDBRequest::ensureEventTargetData()
{
return m_eventTargetData;
}
} // namespace WebCore
#endif
......@@ -50,7 +50,7 @@ class IDBTransaction;
typedef int ExceptionCode;
class IDBRequest : public ScriptWrappable, public IDBCallbacks, public EventTarget, public ActiveDOMObject {
class IDBRequest : public ScriptWrappable, public IDBCallbacks, public EventTargetWithInlineData, public ActiveDOMObject {
public:
static PassRefPtr<IDBRequest> create(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBTransaction*);
static PassRefPtr<IDBRequest> create(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBDatabaseBackendInterface::TaskType, IDBTransaction*);
......@@ -98,9 +98,9 @@ public:
virtual bool hasPendingActivity() const OVERRIDE;
// EventTarget
virtual EventTargetInterface eventTargetInterface() const;
virtual ScriptExecutionContext* scriptExecutionContext() const;
virtual void uncaughtExceptionInEventHandler();
virtual EventTargetInterface eventTargetInterface() const OVERRIDE;
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
virtual void uncaughtExceptionInEventHandler() OVERRIDE FINAL;
using EventTarget::dispatchEvent;
virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
......@@ -135,10 +135,8 @@ private:
virtual void stop() OVERRIDE;
// EventTarget
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData& ensureEventTargetData() OVERRIDE;
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
PassRefPtr<IDBCursor> getResultCursor();
void setResultCursor(PassRefPtr<IDBCursor>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, const ScriptValue&);
......@@ -160,7 +158,6 @@ private:
bool m_didFireUpgradeNeededEvent;
bool m_preventPropagation;
EventTargetData m_eventTargetData;
DOMRequestState m_requestState;
};
......
......@@ -368,16 +368,6 @@ const AtomicString& IDBTransaction::modeToString(IndexedDB::TransactionMode mode
return IDBTransaction::modeReadOnly();
}
EventTargetInterface IDBTransaction::eventTargetInterface() const
{
return IDBTransactionEventTargetInterfaceType;
}
ScriptExecutionContext* IDBTransaction::scriptExecutionContext() const
{
return ActiveDOMObject::scriptExecutionContext();
}
bool IDBTransaction::dispatchEvent(PassRefPtr<Event> event)
{
IDB_TRACE("IDBTransaction::dispatchEvent");
......@@ -436,16 +426,6 @@ void IDBTransaction::enqueueEvent(PassRefPtr<Event> event)
scriptExecutionContext()->eventQueue().enqueueEvent(event);
}
EventTargetData* IDBTransaction::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData& IDBTransaction::ensureEventTargetData()
{
return m_eventTargetData;
}
IDBDatabaseBackendInterface* IDBTransaction::backendDB() const
{
return db()->backend();
......
......@@ -50,7 +50,8 @@ class IDBObjectStore;
class IDBOpenDBRequest;
struct IDBObjectStoreMetadata;
class IDBTransaction : public ScriptWrappable, public RefCounted<IDBTransaction>, public EventTarget, public ActiveDOMObject {
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
class IDBTransaction : public ScriptWrappable, public RefCounted<IDBTransaction>, public EventTargetWithInlineData, public ActiveDOMObject {
public:
static PassRefPtr<IDBTransaction> create(ScriptExecutionContext*, int64_t, const Vector<String>& objectStoreNames, IndexedDB::TransactionMode, IDBDatabase*);
static PassRefPtr<IDBTransaction> create(ScriptExecutionContext*, int64_t, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata& previousMetadata);
......@@ -106,11 +107,11 @@ public:
virtual void onComplete();
// EventTarget
virtual EventTargetInterface eventTargetInterface() const;
virtual ScriptExecutionContext* scriptExecutionContext() const;
virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return IDBTransactionEventTargetInterfaceType; }
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
using EventTarget::dispatchEvent;
virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE FINAL;
// ActiveDOMObject
virtual bool hasPendingActivity() const OVERRIDE;
......@@ -132,10 +133,8 @@ private:
virtual void stop() OVERRIDE;
// EventTarget
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData& ensureEventTargetData() OVERRIDE;
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
enum State {
Inactive, // Created or started, but not in an event callback
......@@ -168,8 +167,6 @@ private:
IDBDatabaseMetadata m_previousMetadata;
HashSet<IDBCursor*> m_openCursors;
EventTargetData m_eventTargetData;
};
} // namespace WebCore
......
......@@ -296,16 +296,6 @@ ScriptExecutionContext* MediaSourceBase::scriptExecutionContext() const
return ActiveDOMObject::scriptExecutionContext();
}
EventTargetData* MediaSourceBase::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData& MediaSourceBase::ensureEventTargetData()
{
return m_eventTargetData;
}
URLRegistry& MediaSourceBase::registry() const
{
return MediaSourceRegistry::registry();
......
......@@ -47,7 +47,7 @@ namespace WebCore {
class GenericEventQueue;
class MediaSourceBase : public RefCounted<MediaSourceBase>, public HTMLMediaSource, public ActiveDOMObject, public EventTarget {
class MediaSourceBase : public RefCounted<MediaSourceBase>, public HTMLMediaSource, public ActiveDOMObject, public EventTargetWithInlineData {
public:
static const AtomicString& openKeyword();
static const AtomicString& closedKeyword();
......@@ -81,11 +81,9 @@ public:
virtual void stop() OVERRIDE;
// EventTarget interface
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData& ensureEventTargetData() OVERRIDE;
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL;
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
// URLRegistrable interface
virtual URLRegistry& registry() const OVERRIDE;
......@@ -105,7 +103,6 @@ protected:
private:
OwnPtr<MediaSourcePrivate> m_private;
EventTargetData m_eventTargetData;
AtomicString m_readyState;
GenericEventQueue m_asyncEventQueue;
bool m_attached;
......
......@@ -209,26 +209,6 @@ void SourceBuffer::stop()
m_appendBufferTimer.stop();
}
ScriptExecutionContext* SourceBuffer::scriptExecutionContext() const
{
return ActiveDOMObject::scriptExecutionContext();
}
EventTargetInterface SourceBuffer::eventTargetInterface() const
{
return SourceBufferEventTargetInterfaceType;
}
EventTargetData* SourceBuffer::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData& SourceBuffer::ensureEventTargetData()
{
return m_eventTargetData;
}
bool SourceBuffer::isRemoved() const
{
return !m_source;
......
......@@ -49,7 +49,8 @@ class MediaSource;
class SourceBufferPrivate;
class TimeRanges;
class SourceBuffer : public RefCounted<SourceBuffer>, public ActiveDOMObject, public EventTarget, public ScriptWrappable {
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
class SourceBuffer : public RefCounted<SourceBuffer>, public ActiveDOMObject, public EventTargetWithInlineData, public ScriptWrappable {
public:
static PassRefPtr<SourceBuffer> create(PassOwnPtr<SourceBufferPrivate>, MediaSource*);
......@@ -72,18 +73,16 @@ public:
virtual void stop() OVERRIDE;
// EventTarget interface
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
virtual EventTargetInterface eventTargetInterface() const OVERRIDE;
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return ActiveDOMObject::scriptExecutionContext(); }
virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return SourceBufferEventTargetInterfaceType; }
using RefCounted<SourceBuffer>::ref;
using RefCounted<SourceBuffer>::deref;
protected:
// EventTarget interface
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData& ensureEventTargetData() OVERRIDE;
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
private:
SourceBuffer(PassOwnPtr<SourceBufferPrivate>, MediaSource*);
......@@ -97,7 +96,6 @@ private:
OwnPtr<SourceBufferPrivate> m_private;
MediaSource* m_source;
GenericEventQueue m_asyncEventQueue;
EventTargetData m_eventTargetData;
bool m_updating;
double m_timestampOffset;
......
......@@ -78,25 +78,6 @@ void SourceBufferList::scheduleEvent(const AtomicString& eventName)
m_asyncEventQueue.enqueueEvent(event.release());
}
EventTargetInterface SourceBufferList::eventTargetInterface() const
{
return SourceBufferListEventTargetInterfaceType;
}
ScriptExecutionContext* SourceBufferList::scriptExecutionContext() const
{
return m_scriptExecutionContext;
}
EventTargetData* SourceBufferList::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData& SourceBufferList::ensureEventTargetData()
{
return m_eventTargetData;
}
} // namespace WebCore
......
......@@ -43,7 +43,8 @@ namespace WebCore {
class SourceBuffer;
class SourceBufferList : public RefCounted<SourceBufferList>, public ScriptWrappable, public EventTarget {
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
class SourceBufferList : public RefCounted<SourceBufferList>, public ScriptWrappable, public EventTargetWithInlineData {
public:
static PassRefPtr<SourceBufferList> create(ScriptExecutionContext* context)
{
......@@ -60,25 +61,20 @@ public:
void clear();
// EventTarget interface
virtual EventTargetInterface eventTargetInterface() const OVERRIDE;
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return SourceBufferListEventTargetInterfaceType; }
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return m_scriptExecutionContext; }
using RefCounted<SourceBufferList>::ref;
using RefCounted<SourceBufferList>::deref;
protected:
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData& ensureEventTargetData() OVERRIDE;
private:
SourceBufferList(ScriptExecutionContext*);
void scheduleEvent(const AtomicString&);
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
EventTargetData m_eventTargetData;
ScriptExecutionContext* m_scriptExecutionContext;
GenericEventQueue m_asyncEventQueue;
......
......@@ -93,26 +93,6 @@ void WebKitSourceBufferList::createAndFireEvent(const AtomicString& eventName)
m_asyncEventQueue.enqueueEvent(event.release());
}
EventTargetInterface WebKitSourceBufferList::eventTargetInterface() const
{
return WebKitSourceBufferListEventTargetInterfaceType;
}
ScriptExecutionContext* WebKitSourceBufferList::scriptExecutionContext() const
{
return m_scriptExecutionContext;
}
EventTargetData* WebKitSourceBufferList::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData& WebKitSourceBufferList::ensureEventTargetData()
{
return m_eventTargetData;
}
} // namespace WebCore
#endif
......@@ -44,7 +44,8 @@ namespace WebCore {
class WebKitSourceBuffer;
class GenericEventQueue;
class WebKitSourceBufferList : public RefCounted<WebKitSourceBufferList>, public ScriptWrappable, public EventTarget {
// FIXME: This class should be marked FINAL once <http://webkit.org/b/121747> is fixed.
class WebKitSourceBufferList : public RefCounted<WebKitSourceBufferList>, public ScriptWrappable, public EventTargetWithInlineData {
public:
static PassRefPtr<WebKitSourceBufferList> create(ScriptExecutionContext* context)
{
......@@ -60,25 +61,20 @@ public:
void clear();
// EventTarget interface
virtual EventTargetInterface eventTargetInterface() const OVERRIDE;
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
virtual EventTargetInterface eventTargetInterface() const OVERRIDE FINAL { return WebKitSourceBufferListEventTargetInterfaceType; }
virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE FINAL { return m_scriptExecutionContext; }
using RefCounted<WebKitSourceBufferList>::ref;
using RefCounted<WebKitSourceBufferList>::deref;
protected:
virtual EventTargetData* eventTargetData() OVERRIDE;
virtual EventTargetData& ensureEventTargetData() OVERRIDE;
private:
WebKitSourceBufferList(ScriptExecutionContext*);
void createAndFireEvent(const AtomicString&);
virtual void refEventTarget() OVERRIDE { ref(); }
virtual void derefEventTarget() OVERRIDE { deref(); }
virtual void refEventTarget() OVERRIDE FINAL { ref(); }
virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
EventTargetData m_eventTargetData;
ScriptExecutionContext* m_scriptExecutionContext;
GenericEventQueue m_asyncEventQueue;
......
......@@ -257,26 +257,6 @@ void MediaStream::contextDestroyed()
m_stopped = true;
}
EventTargetInterface MediaStream::eventTargetInterface() const
{
return MediaStreamEventTargetInterfaceType;
}
ScriptExecutionContext* MediaStream::scriptExecutionContext() const
{
return ContextDestructionObserver::scriptExecutionContext();
}
EventTargetData* MediaStream::eventTargetData()
{
return &m_eventTargetData;
}
EventTargetData& MediaStream::ensureEventTargetData()
{