Bug 947661 - Fix offset test used to find the block chain for a pc.

This commit is contained in:
Brian Hackett 2013-12-08 16:44:54 -08:00
parent 0e8edd9c27
commit 65ff8b089a

View File

@ -1464,7 +1464,7 @@ js::GetBlockChainAtPC(JSScript *script, jsbytecode *pc)
while (check >= bottom) {
const BlockScopeNote *checkNote = &blockScopes->vector[check];
JS_ASSERT(checkNote->start <= offset);
if (offset <= checkNote->start + checkNote->length) {
if (offset < checkNote->start + checkNote->length) {
// We found a matching block chain but there may be inner ones
// at a higher block chain index than mid. Continue the binary search.
blockChain = &script->getObject(checkNote->index)->as<StaticBlockObject>();