| 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 3c0a0395b189b1abeddc2d96353084b9ebb9439a..ebce3bc3cc0b9b0205859c505ccf852b289d65db 100644
|
| --- a/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
|
| @@ -18,8 +18,6 @@ namespace blink {
|
|
|
| static const char* s_avoidOptimization = nullptr;
|
|
|
| -uintptr_t StackFrameDepth::s_stackFrameLimit = kMinimumStackLimit;
|
| -
|
| // NEVER_INLINE ensures that |dummy| array on configureLimit() is not optimized away,
|
| // and the stack frame base register is adjusted |kSafeStackFrameSize|.
|
| NEVER_INLINE static uintptr_t currentStackFrameBaseOnCallee(const char* dummy)
|
| @@ -45,17 +43,17 @@ void StackFrameDepth::enableStackLimit()
|
| // except if ASan is enabled.
|
| size_t stackSize = getUnderestimatedStackSize();
|
| if (!stackSize) {
|
| - s_stackFrameLimit = getFallbackStackLimit();
|
| + m_stackFrameLimit = getFallbackStackLimit();
|
| return;
|
| }
|
|
|
| static const int kStackRoomSize = 1024;
|
|
|
| Address stackBase = reinterpret_cast<Address>(getStackStart());
|
| - RELEASE_ASSERT(stackSize > static_cast<const size_t>(kStackRoomSize));
|
| + CHECK_GT(stackSize, static_cast<const size_t>(kStackRoomSize));
|
| size_t stackRoom = stackSize - kStackRoomSize;
|
| - RELEASE_ASSERT(stackBase > reinterpret_cast<Address>(stackRoom));
|
| - s_stackFrameLimit = reinterpret_cast<uintptr_t>(stackBase - stackRoom);
|
| + CHECK_GT(stackBase, reinterpret_cast<Address>(stackRoom));
|
| + m_stackFrameLimit = reinterpret_cast<uintptr_t>(stackBase - stackRoom);
|
|
|
| // If current stack use is already exceeding estimated limit, mark as disabled.
|
| if (!isSafeToRecurse())
|
| @@ -90,7 +88,7 @@ size_t StackFrameDepth::getUnderestimatedStackSize()
|
| void* base;
|
| size_t size;
|
| error = pthread_attr_getstack(&attr, &base, &size);
|
| - RELEASE_ASSERT(!error);
|
| + CHECK(!error);
|
| pthread_attr_destroy(&attr);
|
| return size;
|
| }
|
| @@ -148,7 +146,7 @@ void* StackFrameDepth::getStackStart()
|
| void* base;
|
| size_t size;
|
| error = pthread_attr_getstack(&attr, &base, &size);
|
| - RELEASE_ASSERT(!error);
|
| + CHECK(!error);
|
| pthread_attr_destroy(&attr);
|
| return reinterpret_cast<uint8_t*>(base) + size;
|
| }
|
|
|