Bug 856796 - Attempt detection of YARR bug; r=till

This commit is contained in:
Sean Stangl 2014-04-07 13:43:50 -07:00
parent 4e65ef4452
commit 0ca496badd

View File

@ -1009,6 +1009,12 @@ public:
}
}
} else {
// Avoid a topcrash before it occurs.
if (!backTrack->lastContext) {
ASSERT(!"Tripped Bug 856796!");
return JSRegExpErrorInternal;
}
resetMatches(term, context);
popParenthesesDisjunctionContext(backTrack);
freeParenthesesDisjunctionContext(context);
@ -1055,6 +1061,12 @@ public:
return JSRegExpMatch;
}
// Avoid a topcrash before it occurs.
if (!backTrack->lastContext) {
ASSERT(!"Tripped Bug 856796!");
return JSRegExpErrorInternal;
}
// pop a match off the stack
resetMatches(term, context);
popParenthesesDisjunctionContext(backTrack);