| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |