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

Unified Diff: Source/platform/heap/ThreadState.cpp

Issue 643883002: Oilpan: Avoid looking up TLS in ThreadState::current() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
« Source/platform/heap/ThreadState.h ('K') | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.cpp
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
index b90d493bf63ac4bf71a69da752add1a52661eee5..2b9bf156b8b5244e879346bf7167833b095321ce 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -101,6 +101,7 @@ static void* getStackStart()
static const size_t MaxPooledWrapperPersistentRegionCount = 2;
WTF::ThreadSpecific<ThreadState*>* ThreadState::s_threadSpecific = 0;
+intptr_t ThreadState::s_mainThreadStackStart = 0;
uint8_t ThreadState::s_mainThreadStateStorage[sizeof(ThreadState)];
SafePointBarrier* ThreadState::s_safePointBarrier = 0;
bool ThreadState::s_inGC = false;
@@ -311,6 +312,9 @@ ThreadState::ThreadState()
ASSERT(!**s_threadSpecific);
**s_threadSpecific = this;
+ if (isMainThread())
+ s_mainThreadStackStart = reinterpret_cast<intptr_t>(m_startOfStack);
+
InitializeHeaps<NumberOfHeaps>::init(m_heaps, this);
m_weakCallbackStack = new CallbackStack();
« Source/platform/heap/ThreadState.h ('K') | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698