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

Side by Side Diff: third_party/WebKit/Source/core/events/EventTarget.cpp

Issue 2086553002: Refactor ScriptWrappableVisitor.markWrapper(PersistentBase) to be instance method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Whitespace fix Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 DEFINE_TRACE_WRAPPERS(EventTarget) 134 DEFINE_TRACE_WRAPPERS(EventTarget)
135 { 135 {
136 EventListenerIterator iterator(const_cast<EventTarget*>(this)); 136 EventListenerIterator iterator(const_cast<EventTarget*>(this));
137 while (EventListener* listener = iterator.nextListener()) { 137 while (EventListener* listener = iterator.nextListener()) {
138 if (listener->type() != EventListener::JSEventListenerType) 138 if (listener->type() != EventListener::JSEventListenerType)
139 continue; 139 continue;
140 V8AbstractEventListener* v8listener = static_cast<V8AbstractEventListene r*>(listener); 140 V8AbstractEventListener* v8listener = static_cast<V8AbstractEventListene r*>(listener);
141 if (!v8listener->hasExistingListenerObject()) 141 if (!v8listener->hasExistingListenerObject())
142 continue; 142 continue;
143 143
144 ScriptWrappableVisitor::markWrapper( 144 visitor->traceWrappers(v8listener);
145 &(v8listener->existingListenerObjectPersistentHandle()),
146 v8listener->isolate());
147 } 145 }
148 } 146 }
149 147
150 EventTarget::EventTarget() 148 EventTarget::EventTarget()
151 { 149 {
152 } 150 }
153 151
154 EventTarget::~EventTarget() 152 EventTarget::~EventTarget()
155 { 153 {
156 } 154 }
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 // they have one less listener to invoke. 642 // they have one less listener to invoke.
645 if (d->firingEventIterators) { 643 if (d->firingEventIterators) {
646 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 644 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
647 d->firingEventIterators->at(i).iterator = 0; 645 d->firingEventIterators->at(i).iterator = 0;
648 d->firingEventIterators->at(i).end = 0; 646 d->firingEventIterators->at(i).end = 0;
649 } 647 }
650 } 648 }
651 } 649 }
652 650
653 } // namespace blink 651 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698