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

Unified Diff: Source/core/inspector/EventListenerInfo.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/inspector/EventListenerInfo.cpp
diff --git a/Source/core/inspector/EventListenerInfo.cpp b/Source/core/inspector/EventListenerInfo.cpp
index 05c5758109537ec1a15dd6f42b69dbdac96b5955..b5d83f61ee14f697fbb948d492c4d812e6cc621f 100644
--- a/Source/core/inspector/EventListenerInfo.cpp
+++ b/Source/core/inspector/EventListenerInfo.cpp
@@ -15,7 +15,7 @@
namespace blink {
-void EventListenerInfo::getEventListeners(EventTarget* target, Vector<EventListenerInfo>& eventInformation, bool includeAncestors)
+void EventListenerInfo::getEventListeners(EventTarget* target, WillBeHeapVector<EventListenerInfo>& eventInformation, bool includeAncestors)
{
// The Node's Ancestors including self.
Vector<EventTarget*> ancestors;
@@ -32,12 +32,14 @@ void EventListenerInfo::getEventListeners(EventTarget* target, Vector<EventListe
Vector<AtomicString> eventTypes = ancestor->eventTypes();
for (size_t j = 0; j < eventTypes.size(); ++j) {
AtomicString& type = eventTypes[j];
- const EventListenerVector& listeners = ancestor->getEventListeners(type);
+ EventListenerVector* listeners = ancestor->getEventListeners(type);
+ if (!listeners)
+ continue;
EventListenerVector filteredListeners;
- filteredListeners.reserveCapacity(listeners.size());
- for (size_t k = 0; k < listeners.size(); ++k) {
- if (listeners[k].listener->type() == EventListener::JSEventListenerType)
- filteredListeners.append(listeners[k]);
+ filteredListeners.reserveCapacity(listeners->size());
+ for (size_t k = 0; k < listeners->size(); ++k) {
+ if (listeners->at(k).listener->type() == EventListener::JSEventListenerType)
+ filteredListeners.append(listeners->at(k));
}
if (!filteredListeners.isEmpty())
eventInformation.append(EventListenerInfo(ancestor, type, filteredListeners));

Powered by Google App Engine
This is Rietveld 408576698