Title: [161170] branches/jsCStack/Source/_javascript_Core
- Revision
- 161170
- Author
- [email protected]
- Date
- 2013-12-30 21:41:48 -0800 (Mon, 30 Dec 2013)
Log Message
CStack: Fix JSStack::ensureCapacity() to match LLINT and JIT stack checks.
https://bugs.webkit.org/show_bug.cgi?id=126328.
Not yet reviewed.
Also removed the now unused JSSTack::topOfStackForCapacityCheck().
* interpreter/JSStack.h:
* interpreter/JSStackInlines.h:
(JSC::JSStack::ensureCapacityFor):
Modified Paths
Diff
Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (161169 => 161170)
--- branches/jsCStack/Source/_javascript_Core/ChangeLog 2013-12-31 05:18:42 UTC (rev 161169)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog 2013-12-31 05:41:48 UTC (rev 161170)
@@ -1,5 +1,18 @@
2013-12-30 Mark Lam <[email protected]>
+ CStack: Fix JSStack::ensureCapacity() to match LLINT and JIT stack checks.
+ https://bugs.webkit.org/show_bug.cgi?id=126328.
+
+ Not yet reviewed.
+
+ Also removed the now unused JSSTack::topOfStackForCapacityCheck().
+
+ * interpreter/JSStack.h:
+ * interpreter/JSStackInlines.h:
+ (JSC::JSStack::ensureCapacityFor):
+
+2013-12-30 Mark Lam <[email protected]>
+
CStack: Introducing Options::maxStackSize().
https://bugs.webkit.org/show_bug.cgi?id=126321.
Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h (161169 => 161170)
--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h 2013-12-31 05:18:42 UTC (rev 161169)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h 2013-12-31 05:41:48 UTC (rev 161170)
@@ -127,7 +127,6 @@
inline Register* topOfFrameFor(CallFrame*);
inline Register* topOfStack();
- inline Register* topOfStackForCapacityCheck();
#if ENABLE(LLINT_C_LOOP)
Register* lowAddress() const
Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStackInlines.h (161169 => 161170)
--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStackInlines.h 2013-12-31 05:18:42 UTC (rev 161169)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStackInlines.h 2013-12-31 05:41:48 UTC (rev 161170)
@@ -39,30 +39,10 @@
return grow(newTopOfStack);
#else
ASSERT(wtfThreadData().stack().isGrowingDownward());
- Register* topOfStack = topOfStackForCapacityCheck();
- if (newTopOfStack > topOfStack)
- return true;
- size_t neededCapacity = (topOfStack - newTopOfStack) * sizeof(Register);
- return m_vm.isSafeToRecurse(neededCapacity);
+ return newTopOfStack >= m_vm.jsStackLimit();
#endif
}
-inline Register* JSStack::topOfStackForCapacityCheck()
-{
-#if !ENABLE(LLINT_C_LOOP)
- // We're trying to get an estimate of the top of the stack for the purpose
- // of a capacity check. If m_topCallFrame is 0, then we can't calculate an
- // accurate top of stack value. Just use the current stack position as an
- // estimate for the top of the stack from where JS code will start executing.
- // This is conservative, but it will be safe.
- if (!m_topCallFrame) {
- Register* p = reinterpret_cast<Register*>(&p);
- return p;
- }
-#endif
- return topOfStack() + 1;
-}
-
inline Register* JSStack::topOfFrameFor(CallFrame* frame)
{
#if ENABLE(LLINT_C_LOOP)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes