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

Unified Diff: third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp

Issue 1409243011: Precisely determine Windows thread stack size (reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gracefully handle yellow zone at the end of the stack Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/ThreadState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
diff --git a/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp b/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
index c118c814b2bdb23a966cb4aa70139e398bf593ea..345e71b1970e485f3dfb6fe7570097dc823e98ca 100644
--- a/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
+++ b/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
@@ -98,14 +98,7 @@ size_t StackFrameDepth::getUnderestimatedStackSize()
// size for the main thread on Mavericks(10.9).
return 0;
#elif OS(WIN) && COMPILER(MSVC)
- // On Windows stack limits for the current thread are available in
- // the thread information block (TIB). Its fields can be accessed through
- // FS segment register on x86 and GS segment register on x86_64.
-#ifdef _WIN64
- return __readgsqword(offsetof(NT_TIB64, StackBase)) - __readgsqword(offsetof(NT_TIB64, StackLimit));
-#else
- return __readfsdword(offsetof(NT_TIB, StackBase)) - __readfsdword(offsetof(NT_TIB, StackLimit));
-#endif
+ return ThreadState::current()->threadStackSize();
#else
#error "Stack frame size estimation not supported on this platform."
return 0;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698