| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 StackUtil_h | 5 #ifndef StackUtil_h |
| 6 #define StackUtil_h | 6 #define StackUtil_h |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 8 #include "wtf/Compiler.h" | 10 #include "wtf/Compiler.h" |
| 9 #include "wtf/WTFExport.h" | 11 #include "wtf/WTFExport.h" |
| 10 #include "wtf/build_config.h" | 12 #include "wtf/build_config.h" |
| 11 #include <stddef.h> | |
| 12 #include <stdint.h> | |
| 13 | 13 |
| 14 namespace WTF { | 14 namespace WTF { |
| 15 | 15 |
| 16 WTF_EXPORT size_t getUnderestimatedStackSize(); | 16 WTF_EXPORT size_t getUnderestimatedStackSize(); |
| 17 WTF_EXPORT void* getStackStart(); | 17 WTF_EXPORT void* getStackStart(); |
| 18 | 18 |
| 19 namespace internal { | 19 namespace internal { |
| 20 | 20 |
| 21 WTF_EXPORT uintptr_t mainThreadUnderestimatedStackSize(); | 21 WTF_EXPORT uintptr_t mainThreadUnderestimatedStackSize(); |
| 22 | 22 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 45 // the stack start of the main thread, we judge that we are in | 45 // the stack start of the main thread, we judge that we are in |
| 46 // the main thread. | 46 // the main thread. |
| 47 return addressDiff >= s_mainThreadUnderestimatedStackSize; | 47 return addressDiff >= s_mainThreadUnderestimatedStackSize; |
| 48 } | 48 } |
| 49 | 49 |
| 50 } // namespace internal | 50 } // namespace internal |
| 51 | 51 |
| 52 } // namespace WTF | 52 } // namespace WTF |
| 53 | 53 |
| 54 #endif // StackUtil_h | 54 #endif // StackUtil_h |
| OLD | NEW |