| Index: third_party/WebKit/Source/platform/UserGestureIndicator.cpp
|
| diff --git a/third_party/WebKit/Source/platform/UserGestureIndicator.cpp b/third_party/WebKit/Source/platform/UserGestureIndicator.cpp
|
| index 517a873060e36f75cbb7f0843809c738ede852fc..84433950de11762274b42ad1da528f1b40838d11 100644
|
| --- a/third_party/WebKit/Source/platform/UserGestureIndicator.cpp
|
| +++ b/third_party/WebKit/Source/platform/UserGestureIndicator.cpp
|
| @@ -118,12 +118,13 @@ static void RecordUserGestureMerge(const UserGestureToken& oldToken,
|
|
|
| UserGestureToken* UserGestureIndicator::s_rootToken = nullptr;
|
|
|
| -UserGestureIndicator::UserGestureIndicator(PassRefPtr<UserGestureToken> token)
|
| - : m_token(token == s_rootToken ? nullptr : token.get()) {
|
| - // Silently ignore UserGestureIndicators on non-main threads.
|
| - if (!isMainThread() || !m_token)
|
| +UserGestureIndicator::UserGestureIndicator(PassRefPtr<UserGestureToken> token) {
|
| + // Silently ignore UserGestureIndicators on non-main threads and tokens that
|
| + // are already active.
|
| + if (!isMainThread() || !token || token == s_rootToken)
|
| return;
|
|
|
| + m_token = token;
|
| if (!s_rootToken) {
|
| s_rootToken = m_token.get();
|
| } else {
|
|
|