Bug 1256704 - Conditional Breakpoints are set to line 1. r=jlong
authorJason Laster <jason.laster.11@gmail.com>
Tue, 15 Mar 2016 10:09:00 -0400
changeset 289344 23c05cd9fcf5f44c2edf4776cb3df45047fe4b10
parent 289343 74176e6545b138d1c84d4d6a2eb6a04c414d9f68
child 289345 02cf3a4bf42ae31d09d2088cb25334d13e2523ec
push id73798
push usercbook@mozilla.com
push dateFri, 18 Mar 2016 15:10:54 +0000
treeherdermozilla-inbound@5096e12520cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlong
bugs1256704
milestone48.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 1256704 - Conditional Breakpoints are set to line 1. r=jlong
devtools/client/debugger/content/views/sources-view.js
--- a/devtools/client/debugger/content/views/sources-view.js
+++ b/devtools/client/debugger/content/views/sources-view.js
@@ -1175,19 +1175,20 @@ SourcesView.prototype = Heritage.extend(
     }
   },
 
   /**
    * Called when the add conditional breakpoint key sequence was pressed.
    */
   _onCmdAddConditionalBreakpoint: function(e) {
     let actor = this.selectedValue;
-    let line = (e && e.sourceEvent.target.tagName == 'menuitem' ?
+    let line = (this.DebuggerView.clickedLine ?
                 this.DebuggerView.clickedLine + 1 :
                 this.DebuggerView.editor.getCursor().line + 1);
+
     let location = { actor, line };
     let bp = getBreakpoint(this.getState(), location);
 
     // If a breakpoint already existed or wasn't a conditional, morph it now.
     if (bp) {
       this.highlightBreakpoint(bp.location, { openPopup: true });
     }
     // No breakpoint existed at the required location, add one now.