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

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

Issue 2728453006: WTF: Initialize main-thread stack estimates when WTF starts up. (Closed)
Patch Set: comment about why currentThread works this way Created 3 years, 9 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/ThreadingWin.cpp ('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/WTF.cpp
diff --git a/third_party/WebKit/Source/wtf/WTF.cpp b/third_party/WebKit/Source/wtf/WTF.cpp
index f6d29b5695cc606b5626c440d4990cd0d8a07532..201efc2747ad2825be7a20eb30bc19c149b53d48 100644
--- a/third_party/WebKit/Source/wtf/WTF.cpp
+++ b/third_party/WebKit/Source/wtf/WTF.cpp
@@ -32,6 +32,8 @@
#include "wtf/Assertions.h"
#include "wtf/Functional.h"
+#include "wtf/StackUtil.h"
+#include "wtf/ThreadSpecific.h"
#include "wtf/Threading.h"
#include "wtf/allocator/Partitions.h"
#include "wtf/text/AtomicString.h"
@@ -63,10 +65,13 @@ void initialize(void (*callOnMainThreadFunction)(MainThreadFunction, void*)) {
// Make that explicit here.
RELEASE_ASSERT(!s_initialized);
s_initialized = true;
+ initializeCurrentThread();
+ s_mainThreadIdentifier = currentThread();
+
initializeThreading();
s_callOnMainThreadFunction = callOnMainThreadFunction;
- s_mainThreadIdentifier = currentThread();
+ internal::initializeMainThreadStackEstimate();
AtomicString::init();
StringStatics::init();
}
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadingWin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698