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

Unified Diff: third_party/WebKit/Source/core/events/ScopedEventQueue.cpp

Issue 2554953005: Avoid WTF::Vector::at() and operator[] in core/events. (Closed)
Patch Set: _ Created 4 years 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: third_party/WebKit/Source/core/events/ScopedEventQueue.cpp
diff --git a/third_party/WebKit/Source/core/events/ScopedEventQueue.cpp b/third_party/WebKit/Source/core/events/ScopedEventQueue.cpp
index 4d54982ce6af48273eb68959d54300fd64fb4e47..3fdd596b51c2c4d2f99641ae888b9a549d03e6db 100644
--- a/third_party/WebKit/Source/core/events/ScopedEventQueue.cpp
+++ b/third_party/WebKit/Source/core/events/ScopedEventQueue.cpp
@@ -66,8 +66,8 @@ void ScopedEventQueue::dispatchAllEvents() {
HeapVector<Member<EventDispatchMediator>> queuedEventDispatchMediators;
queuedEventDispatchMediators.swap(m_queuedEventDispatchMediators);
- for (size_t i = 0; i < queuedEventDispatchMediators.size(); i++)
- dispatchEvent(queuedEventDispatchMediators[i].release());
+ for (auto& mediator : queuedEventDispatchMediators)
+ dispatchEvent(mediator.release());
}
void ScopedEventQueue::dispatchEvent(EventDispatchMediator* mediator) const {
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | third_party/WebKit/Source/core/events/TreeScopeEventContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698