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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptedIdleTaskController.cpp

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 10 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/ScriptedIdleTaskController.h" 5 #include "core/dom/ScriptedIdleTaskController.h"
6 6
7 #include "core/dom/ExecutionContext.h" 7 #include "core/dom/ExecutionContext.h"
8 #include "core/dom/IdleRequestCallback.h" 8 #include "core/dom/IdleRequestCallback.h"
9 #include "core/dom/IdleRequestOptions.h" 9 #include "core/dom/IdleRequestOptions.h"
10 #include "core/frame/PerformanceMonitor.h" 10 #include "core/frame/PerformanceMonitor.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 void ScriptedIdleTaskController::cancelCallback(CallbackId id) { 125 void ScriptedIdleTaskController::cancelCallback(CallbackId id) {
126 TRACE_EVENT_INSTANT1( 126 TRACE_EVENT_INSTANT1(
127 "devtools.timeline", "CancelIdleCallback", TRACE_EVENT_SCOPE_THREAD, 127 "devtools.timeline", "CancelIdleCallback", TRACE_EVENT_SCOPE_THREAD,
128 "data", 128 "data",
129 InspectorIdleCallbackCancelEvent::data(getExecutionContext(), id)); 129 InspectorIdleCallbackCancelEvent::data(getExecutionContext(), id));
130 if (!isValidCallbackId(id)) 130 if (!isValidCallbackId(id))
131 return; 131 return;
132 132
133 m_callbacks.remove(id); 133 m_callbacks.erase(id);
134 } 134 }
135 135
136 void ScriptedIdleTaskController::callbackFired( 136 void ScriptedIdleTaskController::callbackFired(
137 CallbackId id, 137 CallbackId id,
138 double deadlineSeconds, 138 double deadlineSeconds,
139 IdleDeadline::CallbackType callbackType) { 139 IdleDeadline::CallbackType callbackType) {
140 if (!m_callbacks.contains(id)) 140 if (!m_callbacks.contains(id))
141 return; 141 return;
142 142
143 if (m_suspended) { 143 if (m_suspended) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 RefPtr<internal::IdleRequestCallbackWrapper> callbackWrapper = 212 RefPtr<internal::IdleRequestCallbackWrapper> callbackWrapper =
213 internal::IdleRequestCallbackWrapper::create(callback.key, this); 213 internal::IdleRequestCallbackWrapper::create(callback.key, this);
214 m_scheduler->postIdleTask( 214 m_scheduler->postIdleTask(
215 BLINK_FROM_HERE, 215 BLINK_FROM_HERE,
216 WTF::bind(&internal::IdleRequestCallbackWrapper::idleTaskFired, 216 WTF::bind(&internal::IdleRequestCallbackWrapper::idleTaskFired,
217 callbackWrapper)); 217 callbackWrapper));
218 } 218 }
219 } 219 }
220 220
221 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ResizeObserver.cpp ('k') | third_party/WebKit/Source/core/dom/SpaceSplitString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698