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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2799573003: Migrate WTF::HashCountedSet::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 8 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) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 set.insert(domWindow); 196 set.insert(domWindow);
197 } 197 }
198 198
199 static void removeUnloadEventListener(LocalDOMWindow* domWindow) { 199 static void removeUnloadEventListener(LocalDOMWindow* domWindow) {
200 DOMWindowSet& set = windowsWithUnloadEventListeners(); 200 DOMWindowSet& set = windowsWithUnloadEventListeners();
201 DOMWindowSet::iterator it = set.find(domWindow); 201 DOMWindowSet::iterator it = set.find(domWindow);
202 if (it == set.end()) 202 if (it == set.end())
203 return; 203 return;
204 set.remove(it); 204 set.erase(it);
205 if (set.isEmpty()) { 205 if (set.isEmpty()) {
206 updateSuddenTerminationStatus(domWindow, false, 206 updateSuddenTerminationStatus(domWindow, false,
207 LocalFrameClient::UnloadHandler); 207 LocalFrameClient::UnloadHandler);
208 } 208 }
209 } 209 }
210 210
211 static void removeAllUnloadEventListeners(LocalDOMWindow* domWindow) { 211 static void removeAllUnloadEventListeners(LocalDOMWindow* domWindow) {
212 DOMWindowSet& set = windowsWithUnloadEventListeners(); 212 DOMWindowSet& set = windowsWithUnloadEventListeners();
213 DOMWindowSet::iterator it = set.find(domWindow); 213 DOMWindowSet::iterator it = set.find(domWindow);
214 if (it == set.end()) 214 if (it == set.end())
(...skipping 13 matching lines...) Expand all
228 } 228 }
229 229
230 set.insert(domWindow); 230 set.insert(domWindow);
231 } 231 }
232 232
233 static void removeBeforeUnloadEventListener(LocalDOMWindow* domWindow) { 233 static void removeBeforeUnloadEventListener(LocalDOMWindow* domWindow) {
234 DOMWindowSet& set = windowsWithBeforeUnloadEventListeners(); 234 DOMWindowSet& set = windowsWithBeforeUnloadEventListeners();
235 DOMWindowSet::iterator it = set.find(domWindow); 235 DOMWindowSet::iterator it = set.find(domWindow);
236 if (it == set.end()) 236 if (it == set.end())
237 return; 237 return;
238 set.remove(it); 238 set.erase(it);
239 if (set.isEmpty()) { 239 if (set.isEmpty()) {
240 updateSuddenTerminationStatus(domWindow, false, 240 updateSuddenTerminationStatus(domWindow, false,
241 LocalFrameClient::BeforeUnloadHandler); 241 LocalFrameClient::BeforeUnloadHandler);
242 } 242 }
243 } 243 }
244 244
245 static void removeAllBeforeUnloadEventListeners(LocalDOMWindow* domWindow) { 245 static void removeAllBeforeUnloadEventListeners(LocalDOMWindow* domWindow) {
246 DOMWindowSet& set = windowsWithBeforeUnloadEventListeners(); 246 DOMWindowSet& set = windowsWithBeforeUnloadEventListeners();
247 DOMWindowSet::iterator it = set.find(domWindow); 247 DOMWindowSet::iterator it = set.find(domWindow);
248 if (it == set.end()) 248 if (it == set.end())
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 DOMWindow::trace(visitor); 1647 DOMWindow::trace(visitor);
1648 Supplementable<LocalDOMWindow>::trace(visitor); 1648 Supplementable<LocalDOMWindow>::trace(visitor);
1649 } 1649 }
1650 1650
1651 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { 1651 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) {
1652 visitor->traceWrappers(m_customElements); 1652 visitor->traceWrappers(m_customElements);
1653 DOMWindow::traceWrappers(visitor); 1653 DOMWindow::traceWrappers(visitor);
1654 } 1654 }
1655 1655
1656 } // namespace blink 1656 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp ('k') | third_party/WebKit/Source/core/html/HTMLDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698