Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/DOMTimer.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/DOMTimer.cpp b/third_party/WebKit/Source/core/frame/DOMTimer.cpp |
| index d74c1e8b58ffcdf8dbb53ecb620185c34050bb31..0df21a23c9d175c98b7bb0406f91da7703771e65 100644 |
| --- a/third_party/WebKit/Source/core/frame/DOMTimer.cpp |
| +++ b/third_party/WebKit/Source/core/frame/DOMTimer.cpp |
| @@ -64,8 +64,6 @@ int DOMTimer::install(ExecutionContext* context, |
| TRACE_EVENT_SCOPE_THREAD, "data", |
| InspectorTimerInstallEvent::data(context, timeoutID, |
| timeout, singleShot)); |
| - InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(context, |
| - "setTimer", true); |
| return timeoutID; |
| } |
| @@ -74,11 +72,12 @@ void DOMTimer::removeByID(ExecutionContext* context, int timeoutID) { |
| TRACE_EVENT_INSTANT1("devtools.timeline", "TimerRemove", |
| TRACE_EVENT_SCOPE_THREAD, "data", |
| InspectorTimerRemoveEvent::data(context, timeoutID)); |
| - InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( |
| - context, "clearTimer", true); |
| // Eagerly unregister as ExecutionContext observer. |
| - if (timer) |
| + if (timer) { |
| + InspectorInstrumentation::asyncTaskCanceledBreakable(context, |
| + "clearTimeout", timer); |
| timer->clearContext(); |
| + } |
| } |
| DOMTimer::DOMTimer(ExecutionContext* context, |
| @@ -97,8 +96,8 @@ DOMTimer::DOMTimer(ExecutionContext* context, |
| m_userGestureToken = UserGestureIndicator::currentToken(); |
| } |
| - InspectorInstrumentation::asyncTaskScheduled( |
| - context, singleShot ? "setTimeout" : "setInterval", this, !singleShot); |
| + InspectorInstrumentation::asyncTaskScheduledBreakable(context, "setTimeout", |
|
alph
2017/02/21 20:13:58
what happenned to setInterval?
|
| + this, !singleShot); |
| double intervalMilliseconds = |
| std::max(oneMillisecond, interval * oneMillisecond); |
| @@ -145,9 +144,7 @@ void DOMTimer::fired() { |
| InspectorTimerFireEvent::data(context, m_timeoutID)); |
| PerformanceMonitor::HandlerCall handlerCall( |
| context, repeatInterval() ? "setInterval" : "setTimeout", true); |
| - InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( |
| - context, "timerFired", false); |
| - InspectorInstrumentation::AsyncTask asyncTask(context, this); |
| + InspectorInstrumentation::AsyncTask asyncTask(context, this, "timerFired"); |
| // Simple case for non-one-shot timers. |
| if (isActive()) { |