Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(723)

Unified Diff: Source/core/dom/GenericEventQueue.cpp

Issue 15739014: Avoid referencing an HTMLMediaElement if is currently being deleted (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/GenericEventQueue.cpp
diff --git a/Source/core/dom/GenericEventQueue.cpp b/Source/core/dom/GenericEventQueue.cpp
index 172074f0071ee69f41a5d15c4e776ef306a0b0ea..9644a76c9b65bc596cc4bf097beb482af2eb4905 100644
--- a/Source/core/dom/GenericEventQueue.cpp
+++ b/Source/core/dom/GenericEventQueue.cpp
@@ -100,6 +100,21 @@ void GenericEventQueue::close()
m_pendingEvents.clear();
}
+bool GenericEventQueue::enqueueEventWithoutTarget(PassRefPtr<Event> event)
+{
+ if (m_isClosed)
+ return false;
+
+ ASSERT(!event->target());
+
+ m_pendingEvents.append(event);
+
+ if (!m_timer.isActive())
+ m_timer.startOneShot(0);
+
+ return true;
+}
+
void GenericEventQueue::cancelAllEvents()
{
m_timer.stop();

Powered by Google App Engine
This is Rietveld 408576698