| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef StackFrameDepth_h | 5 #ifndef StackFrameDepth_h |
| 6 #define StackFrameDepth_h | 6 #define StackFrameDepth_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
| 10 #include "wtf/Assertions.h" | 10 #include "wtf/Assertions.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 s_stackFrameLimit = 0; | 37 s_stackFrameLimit = 0; |
| 38 #if ENABLE(ASSERT) | 38 #if ENABLE(ASSERT) |
| 39 s_isEnabled = false; | 39 s_isEnabled = false; |
| 40 #endif | 40 #endif |
| 41 } | 41 } |
| 42 | 42 |
| 43 #if ENABLE(ASSERT) | 43 #if ENABLE(ASSERT) |
| 44 inline static bool isEnabled() { return s_isEnabled; } | 44 inline static bool isEnabled() { return s_isEnabled; } |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 static bool hasInsufficientStackForGC(); |
| 48 |
| 47 static size_t getUnderestimatedStackSize(); | 49 static size_t getUnderestimatedStackSize(); |
| 48 static void* getStackStart(); | 50 static void* getStackStart(); |
| 49 | 51 |
| 50 #if COMPILER(MSVC) | 52 #if COMPILER(MSVC) |
| 51 // Ignore C4172: returning address of local variable or temporary: dummy. This | 53 // Ignore C4172: returning address of local variable or temporary: dummy. This |
| 52 // warning suppression has to go outside of the function to take effect. | 54 // warning suppression has to go outside of the function to take effect. |
| 53 #pragma warning(push) | 55 #pragma warning(push) |
| 54 #pragma warning(disable: 4172) | 56 #pragma warning(disable: 4172) |
| 55 #endif | 57 #endif |
| 56 static uintptr_t currentStackFrame(const char* dummy = nullptr) | 58 static uintptr_t currentStackFrame(const char* dummy = nullptr) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 93 |
| 92 ~StackFrameDepthScope() | 94 ~StackFrameDepthScope() |
| 93 { | 95 { |
| 94 StackFrameDepth::disableStackLimit(); | 96 StackFrameDepth::disableStackLimit(); |
| 95 } | 97 } |
| 96 }; | 98 }; |
| 97 | 99 |
| 98 } // namespace blink | 100 } // namespace blink |
| 99 | 101 |
| 100 #endif // StackFrameDepth_h | 102 #endif // StackFrameDepth_h |
| OLD | NEW |