| Index: third_party/WebKit/Source/core/events/EventTarget.cpp
|
| diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| index 4b272b815d8d1ef8c4b6e19c9ce8d380cd0f98e8..a125d77160ca4b119ff44e2d16172b7f283eb566 100644
|
| --- a/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| +++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
|
| @@ -367,8 +367,7 @@ bool EventTarget::removeEventListenerInternal(
|
| // Notify firing events planning to invoke the listener at 'index' that
|
| // they have one less listener to invoke.
|
| if (d->firingEventIterators) {
|
| - for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
|
| - FiringEventIterator& firingIterator = d->firingEventIterators->at(i);
|
| + for (const auto& firingIterator : *d->firingEventIterators) {
|
| if (eventType != firingIterator.eventType)
|
| continue;
|
|
|
| @@ -750,9 +749,9 @@ void EventTarget::removeAllEventListeners() {
|
| // Notify firing events planning to invoke the listener at 'index' that
|
| // they have one less listener to invoke.
|
| if (d->firingEventIterators) {
|
| - for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
|
| - d->firingEventIterators->at(i).iterator = 0;
|
| - d->firingEventIterators->at(i).end = 0;
|
| + for (const auto& iterator : *d->firingEventIterators) {
|
| + iterator.iterator = 0;
|
| + iterator.end = 0;
|
| }
|
| }
|
| }
|
|
|