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

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

Issue 220693002: Protect EventListener from being deleted before it is passed into InspectorInstrumentation::didRemo… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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/EventTarget.cpp
diff --git a/Source/core/events/EventTarget.cpp b/Source/core/events/EventTarget.cpp
index 7243a6ec75f6ddac686223fc914fde927cfc83a2..30bd252081872fa4300f8b802d3fa22c56c3f84e 100644
--- a/Source/core/events/EventTarget.cpp
+++ b/Source/core/events/EventTarget.cpp
@@ -102,6 +102,7 @@ bool EventTarget::removeEventListener(const AtomicString& eventType, EventListen
size_t indexOfRemovedListener;
+ RefPtr<EventListener> protect(listener);
if (!d->eventListenerMap.remove(eventType, listener, useCapture, indexOfRemovedListener))
return false;
InspectorInstrumentation::didRemoveEventListener(this, eventType, listener, useCapture);
« 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