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

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

Issue 2646003003: Avoid checking for WTFThreadData::staticData in wtfThreadData() (Closed)
Patch Set: fix bad rebase 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
« no previous file with comments | « third_party/WebKit/Source/wtf/WTFThreadData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/WTFThreadData.cpp
diff --git a/third_party/WebKit/Source/wtf/WTFThreadData.cpp b/third_party/WebKit/Source/wtf/WTFThreadData.cpp
index af0e33cf7796b3b1515d282b3d563d0d8729e500..7130a88d409b85eddf70c5b5b72fb884c30411f9 100644
--- a/third_party/WebKit/Source/wtf/WTFThreadData.cpp
+++ b/third_party/WebKit/Source/wtf/WTFThreadData.cpp
@@ -41,6 +41,12 @@ WTFThreadData::WTFThreadData()
WTFThreadData::~WTFThreadData() {}
+void WTFThreadData::initialize() {
+ DCHECK(!WTFThreadData::staticData);
+ WTFThreadData::staticData = new ThreadSpecific<WTFThreadData>;
+ wtfThreadData();
+}
+
#if OS(WIN) && COMPILER(MSVC)
size_t WTFThreadData::threadStackSize() {
// Needed to bootstrap WTFThreadData on Windows, because this value is needed
« no previous file with comments | « third_party/WebKit/Source/wtf/WTFThreadData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698