mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[JAEGER] Fixed bugs in commit bumping (bug 586886 fallout).
This commit is contained in:
parent
28704289d9
commit
7e9b41be71
@ -143,7 +143,7 @@ StackSpace::ensureSpace(JSContext *maybecx, Value *start, Value *from,
|
||||
* over-recursing.
|
||||
*/
|
||||
ptrdiff_t nvals = VALUES_PER_STACK_FRAME + nslots;
|
||||
if (commitEnd < limit && from + nvals < limit) {
|
||||
if (commitEnd <= limit && from + nvals < (start + MAX_STACK_USAGE)) {
|
||||
if (!ensureSpace(maybecx, from, nvals))
|
||||
return false;
|
||||
|
||||
|
@ -733,7 +733,7 @@ mjit::ProfileStubCall(VMFrame &f)
|
||||
bool
|
||||
VMFrame::slowEnsureSpace(uint32 nslots)
|
||||
{
|
||||
return cx->stack().ensureSpace(cx, reinterpret_cast<Value*>(fp), regs.sp,
|
||||
return cx->stack().ensureSpace(cx, reinterpret_cast<Value*>(entryFp), regs.sp,
|
||||
stackLimit, nslots);
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ struct VMFrame
|
||||
|
||||
inline bool ensureSpace(uint32 nmissing, uint32 nslots) {
|
||||
/* Fast check - if it's below the limit, it's safe to just get a frame. */
|
||||
if (JS_LIKELY(regs.sp + nmissing + nslots < stackLimit))
|
||||
if (JS_LIKELY(regs.sp + VALUES_PER_STACK_FRAME + nmissing + nslots < stackLimit))
|
||||
return true;
|
||||
|
||||
/* Slower check that might have to commit memory or throw an error. */
|
||||
|
Loading…
Reference in New Issue
Block a user