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 a6140804ca9f54ac1a5eb73cb73cc82aa0a5ac0c..5dd767478644789ffeb7c2e77d4584c527ae4750 100644 |
| --- a/third_party/WebKit/Source/core/frame/DOMTimer.cpp |
| +++ b/third_party/WebKit/Source/core/frame/DOMTimer.cpp |
| @@ -47,7 +47,7 @@ static const double oneMillisecond = 0.001; |
| static const double minimumInterval = 0.004; |
| static inline bool shouldForwardUserGesture(int interval, int nestingLevel) { |
| - return UserGestureIndicator::processingUserGesture() && |
| + return UserGestureIndicator::processingUserGestureThreadSafe() && |
| interval <= maxIntervalForUserGestureForwarding && |
| nestingLevel == |
| 1; // Gestures should not be forwarded to nested timers. |
| @@ -91,7 +91,7 @@ DOMTimer::DOMTimer(ExecutionContext* context, |
| m_action(action) { |
| ASSERT(timeoutID > 0); |
| if (shouldForwardUserGesture(interval, m_nestingLevel)) |
| - m_userGestureToken = UserGestureIndicator::currentToken(); |
| + m_userGestureToken = UserGestureIndicator::currentTokenThreadSafe(); |
|
kinuko
2016/12/12 15:37:49
Looks like we only take this code path if shouldFo
Charlie Harrison
2016/12/12 15:44:39
Yes you're right. Let's move this one to assume we
|
| InspectorInstrumentation::asyncTaskScheduled( |
| context, singleShot ? "setTimeout" : "setInterval", this, !singleShot); |