Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/Source/JavaScriptCore/interpreter/Interpreter.cpp
- +++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp
- @@ -116,11 +116,11 @@ Interpreter::ErrorHandlingMode::~ErrorHandlingMode()
- Interpreter::StackPolicy::StackPolicy(Interpreter& interpreter, const StackBounds& stack)
- : m_interpreter(interpreter)
- {
- - int size = stack.size();
- + size_t size = stack.size();
- - const int DEFAULT_REQUIRED_STACK = 1024 * 1024;
- - const int DEFAULT_MINIMUM_USEABLE_STACK = 128 * 1024;
- - const int DEFAULT_ERROR_MODE_REQUIRED_STACK = 32 * 1024;
- + const size_t DEFAULT_REQUIRED_STACK = 1024 * 1024;
- + const size_t DEFAULT_MINIMUM_USEABLE_STACK = 128 * 1024;
- + const size_t DEFAULT_ERROR_MODE_REQUIRED_STACK = 32 * 1024;
- // Here's the policy in a nutshell:
- //
- @@ -174,10 +174,11 @@ Interpreter::StackPolicy::StackPolicy(Interpreter& interpreter, const StackBound
- // Policy 1: Normal mode: required = DEFAULT_REQUIRED_STACK.
- // Policy 2: Erro mode: required = DEFAULT_ERROR_MODE_REQUIRED_STACK.
- - int requiredCapacity = !m_interpreter.m_errorHandlingModeReentry ?
- + size_t requiredCapacity = !m_interpreter.m_errorHandlingModeReentry ?
- DEFAULT_REQUIRED_STACK : DEFAULT_ERROR_MODE_REQUIRED_STACK;
- - int useableStack = size - requiredCapacity;
- + ASSERT(size >= requiredCapacity);
- + size_t useableStack = size - requiredCapacity;
- // Policy 3: Ensure the useable stack is not too small:
- if (useableStack < DEFAULT_MINIMUM_USEABLE_STACK)
- @@ -191,8 +192,9 @@ Interpreter::StackPolicy::StackPolicy(Interpreter& interpreter, const StackBound
- // Re-compute the requiredCapacity based on the adjusted useable stack
- // size:
- // interpreter stack checks:
- + ASSERT(size >= useableStack);
- requiredCapacity = size - useableStack;
- - ASSERT((requiredCapacity >= 0) && (requiredCapacity < size));
- + ASSERT(requiredCapacity < size);
- m_requiredCapacity = requiredCapacity;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement