| 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 #include "platform/heap/StackFrameDepth.h" | 5 #include "platform/heap/StackFrameDepth.h" |
| 6 | 6 |
| 7 #include "platform/wtf/StackUtil.h" |
| 7 #include "public/platform/Platform.h" | 8 #include "public/platform/Platform.h" |
| 8 #include "wtf/StackUtil.h" | |
| 9 | 9 |
| 10 #if OS(WIN) | 10 #if OS(WIN) |
| 11 #include <stddef.h> | 11 #include <stddef.h> |
| 12 #include <windows.h> | 12 #include <windows.h> |
| 13 #include <winnt.h> | 13 #include <winnt.h> |
| 14 #elif defined(__GLIBC__) | 14 #elif defined(__GLIBC__) |
| 15 extern "C" void* __libc_stack_end; // NOLINT | 15 extern "C" void* __libc_stack_end; // NOLINT |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 RELEASE_ASSERT(stackBase > reinterpret_cast<Address>(stackRoom)); | 53 RELEASE_ASSERT(stackBase > reinterpret_cast<Address>(stackRoom)); |
| 54 m_stackFrameLimit = reinterpret_cast<uintptr_t>(stackBase - stackRoom); | 54 m_stackFrameLimit = reinterpret_cast<uintptr_t>(stackBase - stackRoom); |
| 55 | 55 |
| 56 // If current stack use is already exceeding estimated limit, mark as | 56 // If current stack use is already exceeding estimated limit, mark as |
| 57 // disabled. | 57 // disabled. |
| 58 if (!isSafeToRecurse()) | 58 if (!isSafeToRecurse()) |
| 59 disableStackLimit(); | 59 disableStackLimit(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace blink | 62 } // namespace blink |
| OLD | NEW |