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

Unified Diff: Source/core/frame/EventHandlerRegistry.cpp

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/frame/EventHandlerRegistry.cpp
diff --git a/Source/core/frame/EventHandlerRegistry.cpp b/Source/core/frame/EventHandlerRegistry.cpp
index 45f5d67e4de779623b8a5503290287c62802d144..f04362b3495eb2568fcb8ee9e652aaa06490bf9c 100644
--- a/Source/core/frame/EventHandlerRegistry.cpp
+++ b/Source/core/frame/EventHandlerRegistry.cpp
@@ -161,7 +161,10 @@ void EventHandlerRegistry::didMoveIntoFrameHost(EventTarget& target)
EventHandlerClass handlerClass;
if (!eventTypeToClass(eventTypes[i], &handlerClass))
continue;
- for (unsigned count = target.getEventListeners(eventTypes[i]).size(); count > 0; --count)
+ EventListenerVector* listeners = target.getEventListeners(eventTypes[i]);
+ if (!listeners)
+ continue;
+ for (unsigned count = listeners->size(); count > 0; --count)
didAddEventHandler(target, handlerClass);
}
}

Powered by Google App Engine
This is Rietveld 408576698