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

Side by Side Diff: Source/core/workers/WorkerEventQueue.cpp

Issue 644663004: Use C++11 features in core/workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/workers/WorkerEventQueue.h ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 if (!task) 129 if (!task)
130 return false; 130 return false;
131 task->cancel(); 131 task->cancel();
132 removeEvent(event); 132 removeEvent(event);
133 return true; 133 return true;
134 } 134 }
135 135
136 void WorkerEventQueue::close() 136 void WorkerEventQueue::close()
137 { 137 {
138 m_isClosed = true; 138 m_isClosed = true;
139 for (EventTaskMap::iterator it = m_eventTaskMap.begin(); it != m_eventTaskMa p.end(); ++it) { 139 for (const auto& entry : m_eventTaskMap) {
140 Event* event = it->key.get(); 140 Event* event = entry.key.get();
141 EventDispatcherTask* task = it->value; 141 EventDispatcherTask* task = entry.value;
142 InspectorInstrumentation::didRemoveEvent(event->target(), event); 142 InspectorInstrumentation::didRemoveEvent(event->target(), event);
143 task->cancel(); 143 task->cancel();
144 } 144 }
145 m_eventTaskMap.clear(); 145 m_eventTaskMap.clear();
146 } 146 }
147 147
148 } 148 }
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerEventQueue.h ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698