Bug 1500822 - Fix a try-note range check in the debugger r=jorendorff
☠☠ backed out by bff46c89a68b ☠ ☠
authorTed Campbell <tcampbell@mozilla.com>
Mon, 22 Oct 2018 18:39:24 +0000
changeset 490813 cb7ced1eb7edea847195a701f2ef000c70d5e8a5
parent 490812 8753dbb0045e86c9a90b04199ec367a5ea3ede28
child 490814 406ca9722ffaa14caf02923c541942725f835d32
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersjorendorff
bugs1500822
milestone65.0a1
Bug 1500822 - Fix a try-note range check in the debugger r=jorendorff This should symptomless since the extra op should always be a JSOP_GOTO which will be skipped over anyways. Fix for our sanity. Differential Revision: https://phabricator.services.mozilla.com/D9422
js/src/vm/Debugger.cpp
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -7464,17 +7464,17 @@ class DebuggerScriptIsInCatchScopeMatche
     ReturnType match(HandleScript script) {
         if (!EnsureScriptOffsetIsValid(cx_, script, offset_)) {
             return false;
         }
 
         if (script->hasTrynotes()) {
             for (const JSTryNote& tn : script->trynotes()) {
                 if (tn.start <= offset_ &&
-                    offset_ <= tn.start + tn.length &&
+                    offset_ < tn.start + tn.length &&
                     tn.kind == JSTRY_CATCH)
                 {
                     isInCatch_ = true;
                     return true;
                 }
             }
         }
         isInCatch_ = false;