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

Unified Diff: third_party/WebKit/Source/wtf/WTF.cpp

Issue 2646003003: Avoid checking for WTFThreadData::staticData in wtfThreadData() (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/WTF.cpp
diff --git a/third_party/WebKit/Source/wtf/WTF.cpp b/third_party/WebKit/Source/wtf/WTF.cpp
index 5fb8a67f95cad7069ca53aa39a91f07a789fc395..494219ae7280467bbe0abca80cf350e9e48e5fbe 100644
--- a/third_party/WebKit/Source/wtf/WTF.cpp
+++ b/third_party/WebKit/Source/wtf/WTF.cpp
@@ -53,6 +53,10 @@ void callOnMainThread(MainThreadFunction* function, void* context) {
(*s_callOnMainThreadFunction)(function, context);
}
+bool isMainThreadSyscall() {
+ return internal::currentThreadSyscall() == s_mainThreadIdentifier;
+}
+
} // namespace internal
bool isMainThread() {

Powered by Google App Engine
This is Rietveld 408576698