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

Unified Diff: third_party/WebKit/Source/web/WebUserGestureIndicator.cpp

Issue 2555013004: UserGestureIndicator: remove many unnecessary calls to isMainThread (Closed)
Patch Set: [test] remove isMainThread() check in currentToken() Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebUserGestureIndicator.cpp
diff --git a/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp b/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp
index e1eaf1b52459469ceb9fb1ce05652574b7455c7d..24ff7478698162cf577b3b51cab2eb861cadf37c 100644
--- a/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp
+++ b/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp
@@ -37,11 +37,18 @@
namespace blink {
bool WebUserGestureIndicator::isProcessingUserGesture() {
- return UserGestureIndicator::processingUserGesture();
+ return UserGestureIndicator::processingUserGesture(
+ UserGestureIndicator::DoNotCheckThreadState);
+}
+
+bool WebUserGestureIndicator::isProcessingUserGestureThreadSafe() {
+ return UserGestureIndicator::processingUserGesture(
+ UserGestureIndicator::CheckThreadState);
}
bool WebUserGestureIndicator::consumeUserGesture() {
- return UserGestureIndicator::consumeUserGesture();
+ return UserGestureIndicator::consumeUserGesture(
+ UserGestureIndicator::CheckThreadState);
}
bool WebUserGestureIndicator::processedUserGestureSinceLoad(
@@ -51,7 +58,8 @@ bool WebUserGestureIndicator::processedUserGestureSinceLoad(
}
WebUserGestureToken WebUserGestureIndicator::currentUserGestureToken() {
- return WebUserGestureToken(UserGestureIndicator::currentToken());
+ return WebUserGestureToken(UserGestureIndicator::currentToken(
+ UserGestureIndicator::CheckThreadState));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698