Bug 947661 - Fix offset test used to find the block chain for a pc.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 08 Dec 2013 16:44:54 -0800
changeset 175149 cb05468384511b22cd619d0f04628429613d9de6
parent 175148 f749a52bd4e64ff9456e3b13a2d0baa7e2c97f35
child 175150 d9a7e0906f2ac2ed92580c0804fdcdb626adf17d
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs947661
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 947661 - Fix offset test used to find the block chain for a pc.
js/src/jsopcode.cpp
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -1459,17 +1459,17 @@ js::GetBlockChainAtPC(JSScript *script, 
             // blocks form a tree ones earlier in the list may cover the pc even if
             // later blocks end before the pc. This only happens when the earlier block
             // is a parent of the later block, so we need to check parents of |mid| in
             // the searched range for coverage.
             size_t check = mid;
             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>();
                     break;
                 }
                 if (checkNote->parent == UINT32_MAX)
                     break;
                 check = checkNote->parent;