File webkitgtk-commit-size.patch of Package webkitgtk
diff -ur webkitgtk-2.4.2.orig/Source/JavaScriptCore/interpreter/JSStack.cpp webkitgtk-2.4.2/Source/JavaScriptCore/interpreter/JSStack.cpp
--- webkitgtk-2.4.2.orig/Source/JavaScriptCore/interpreter/JSStack.cpp 2014-05-12 01:03:53.000000000 -0500
+++ webkitgtk-2.4.2/Source/JavaScriptCore/interpreter/JSStack.cpp 2014-06-03 21:21:50.557586002 -0500
@@ -49,7 +49,8 @@
{
ASSERT(capacity && isPageAligned(capacity));
- m_reservation = PageReservation::reserve(roundUpAllocationSize(capacity * sizeof(Register), commitSize), OSAllocator::JSVMStackPages);
+ size_t commitsize = pageSize();
+ m_reservation = PageReservation::reserve(roundUpAllocationSize(capacity * sizeof(Register), commitsize), OSAllocator::JSVMStackPages);
updateStackLimit(highAddress());
m_commitEnd = highAddress();
@@ -78,7 +79,8 @@
// Compute the chunk size of additional memory to commit, and see if we
// have it is still within our budget. If not, we'll fail to grow and
// return false.
- long delta = roundUpAllocationSize(reinterpret_cast<char*>(m_commitEnd) - reinterpret_cast<char*>(newEnd), commitSize);
+ size_t commitsize = pageSize();
+ long delta = roundUpAllocationSize(reinterpret_cast<char*>(m_commitEnd) - reinterpret_cast<char*>(newEnd), commitsize);
if (reinterpret_cast<char*>(m_commitEnd) - delta <= reinterpret_cast<char*>(m_useableEnd))
return false;
@@ -134,7 +136,8 @@
void JSStack::disableErrorStackReserve()
{
- char* useableEnd = reinterpret_cast<char*>(reservationEnd()) + commitSize;
+ size_t commitsize = pageSize();
+ char* useableEnd = reinterpret_cast<char*>(reservationEnd()) + commitsize;
m_useableEnd = reinterpret_cast_ptr<Register*>(useableEnd);
// By the time we get here, we are guaranteed to be destructing the last