diff options
-rw-r--r-- | Source/WebCore/dom/GenericEventQueue.cpp | 1 | ||||
-rw-r--r-- | Source/WebCore/html/HTMLMediaElement.cpp | 9 | ||||
-rw-r--r-- | Source/WebCore/plugins/PluginStream.cpp | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/Source/WebCore/dom/GenericEventQueue.cpp b/Source/WebCore/dom/GenericEventQueue.cpp index a177d61a8..a04e489c7 100644 --- a/Source/WebCore/dom/GenericEventQueue.cpp +++ b/Source/WebCore/dom/GenericEventQueue.cpp @@ -52,7 +52,6 @@ bool GenericEventQueue::enqueueEvent(PassRefPtr<Event> event) if (m_isClosed) return false; - ASSERT(event->target()); if (event->target() == m_owner) event->setTarget(0); diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp index c0d129eba..3ef167106 100644 --- a/Source/WebCore/html/HTMLMediaElement.cpp +++ b/Source/WebCore/html/HTMLMediaElement.cpp @@ -299,6 +299,9 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* docum HTMLMediaElement::~HTMLMediaElement() { LOG(Media, "HTMLMediaElement::~HTMLMediaElement"); + + m_asyncEventQueue->close(); + if (m_isWaitingUntilMediaCanStart) document()->removeMediaCanStartListener(this); setShouldDelayLoadEvent(false); @@ -617,7 +620,9 @@ void HTMLMediaElement::scheduleEvent(const AtomicString& eventName) LOG(Media, "HTMLMediaElement::scheduleEvent - scheduling '%s'", eventName.string().ascii().data()); #endif RefPtr<Event> event = Event::create(eventName, false, true); - event->setTarget(this); + + // Don't set the event target, the event queue will set it in GenericEventQueue::timerFired and setting it here + // will trigger an ASSERT if this element has been marked for deletion. m_asyncEventQueue->enqueueEvent(event.release()); } @@ -3807,6 +3812,8 @@ void HTMLMediaElement::stop() stopPeriodicTimers(); cancelPendingEventsAndCallbacks(); + + m_asyncEventQueue->close(); } void HTMLMediaElement::suspend(ReasonForSuspension why) diff --git a/Source/WebCore/plugins/PluginStream.cpp b/Source/WebCore/plugins/PluginStream.cpp index 1e71708d0..b03436166 100644 --- a/Source/WebCore/plugins/PluginStream.cpp +++ b/Source/WebCore/plugins/PluginStream.cpp @@ -77,6 +77,7 @@ PluginStream::PluginStream(PluginStreamClient* client, Frame* frame, const Resou m_stream.end = 0; m_stream.notifyData = 0; m_stream.lastmodified = 0; + m_stream.headers = 0; streams().add(&m_stream, m_instance); } |