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

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

Issue 1663823002: If marking system stack is unknown, be more forgiving about stack depths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reorder logic Created 4 years, 10 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/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 8e459762a3b7ab125a3cf164076134b7a4166cde..a7380d5687aafb2676bb0d3da91bc87a2855f64e 100644
--- a/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
+++ b/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
@@ -21,6 +21,7 @@ static const char* s_avoidOptimization = nullptr;
uintptr_t StackFrameDepth::s_stackFrameLimit = 0;
#if ENABLE(ASSERT)
bool StackFrameDepth::s_isEnabled = false;
+bool StackFrameDepth::s_isUsingFallbackStackSize = false;
#endif
// NEVER_INLINE ensures that |dummy| array on configureLimit() is not optimized away,
@@ -35,6 +36,7 @@ void StackFrameDepth::enableStackLimit()
{
#if ENABLE(ASSERT)
s_isEnabled = true;
+ s_isUsingFallbackStackSize = false;
#endif
static const int kStackRoomSize = 1024;
@@ -56,6 +58,12 @@ void StackFrameDepth::enableStackLimit()
// Assert that the stack frame can be used.
dummy[sizeof(dummy) - 1] = 0;
+#if ENABLE(ASSERT)
+ // Use a larger stack limit for what's acceptable if the platform
+ // thread ends up using the fallback size to decide if switching to
+ // lazy marking is in order.
+ s_isUsingFallbackStackSize = true;
+#endif
}
size_t StackFrameDepth::getUnderestimatedStackSize()
« no previous file with comments | « third_party/WebKit/Source/platform/heap/StackFrameDepth.h ('k') | third_party/WebKit/Source/platform/heap/TraceTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698