diff options
Diffstat (limited to 'Source/JavaScriptCore/bytecode/ExecutionCounter.cpp')
-rw-r--r-- | Source/JavaScriptCore/bytecode/ExecutionCounter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp b/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp index e619a0376..dca9c5126 100644 --- a/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp +++ b/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp @@ -113,7 +113,8 @@ bool ExecutionCounter::hasCrossedThreshold(CodeBlock* codeBlock) const double modifiedThreshold = applyMemoryUsageHeuristics(m_activeThreshold, codeBlock); return static_cast<double>(m_totalCount) + m_counter >= - modifiedThreshold - static_cast<double>(m_activeThreshold) / 2; + modifiedThreshold - static_cast<double>( + std::min(m_activeThreshold, Options::maximumExecutionCountsBetweenCheckpoints())) / 2; } bool ExecutionCounter::setThreshold(CodeBlock* codeBlock) |