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

Unified Diff: Source/core/events/DOMWindowEventQueue.cpp

Issue 453943003: Fix crash in blink::DOMWindowEventQueue::close (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/DOMWindowEventQueue.cpp
diff --git a/Source/core/events/DOMWindowEventQueue.cpp b/Source/core/events/DOMWindowEventQueue.cpp
index f785f8906fe09ba39a92df006931a6570b23595b..b4705379ac5fbe5fe410add3f0ef89cb9d80bc50 100644
--- a/Source/core/events/DOMWindowEventQueue.cpp
+++ b/Source/core/events/DOMWindowEventQueue.cpp
@@ -109,8 +109,11 @@ void DOMWindowEventQueue::close()
m_pendingEventTimer->stop();
if (InspectorInstrumentation::hasFrontends()) {
WillBeHeapListHashSet<RefPtrWillBeMember<Event>, 16>::iterator it = m_queuedEvents.begin();
- for (; it != m_queuedEvents.end(); ++it)
- InspectorInstrumentation::didRemoveEvent((*it)->target(), it->get());
+ for (; it != m_queuedEvents.end(); ++it) {
+ RefPtrWillBeRawPtr<Event> event = *it;
+ if (event)
+ InspectorInstrumentation::didRemoveEvent(event->target(), event.get());
+ }
}
m_queuedEvents.clear();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698