Index: Source/platform/heap/StackFrameDepth.cpp |
diff --git a/Source/platform/heap/StackFrameDepth.cpp b/Source/platform/heap/StackFrameDepth.cpp |
index caae8faaa1aa296f3037cb02eb8abfd9f2e2d5e5..c118c814b2bdb23a966cb4aa70139e398bf593ea 100644 |
--- a/Source/platform/heap/StackFrameDepth.cpp |
+++ b/Source/platform/heap/StackFrameDepth.cpp |
@@ -20,6 +20,9 @@ namespace blink { |
static const char* s_avoidOptimization = nullptr; |
uintptr_t StackFrameDepth::s_stackFrameLimit = 0; |
+#if ENABLE(ASSERT) |
+bool StackFrameDepth::s_isEnabled = false; |
+#endif |
// NEVER_INLINE ensures that |dummy| array on configureLimit() is not optimized away, |
// and the stack frame base register is adjusted |kSafeStackFrameSize|. |
@@ -29,8 +32,12 @@ NEVER_INLINE static uintptr_t currentStackFrameBaseOnCallee(const char* dummy) |
return StackFrameDepth::currentStackFrame(); |
} |
-void StackFrameDepth::configureStackLimit() |
+void StackFrameDepth::enableStackLimit() |
{ |
+#if ENABLE(ASSERT) |
+ s_isEnabled = true; |
+#endif |
+ |
static const int kStackRoomSize = 1024; |
size_t stackSize = getUnderestimatedStackSize(); |