Bug 1517334 - [release 114] Fix cmd/ctrl+shift+b shortcut to toggle conditional breakpoint (#7589). r=dwalsh
authorJason Laster <jlaster@mozilla.com>
Wed, 02 Jan 2019 15:58:49 -0500
changeset 509422 e932747568eda5eb6a1ac4ca0f52b2ef880c015f
parent 509421 09c1b8c9d5f4f2001bc5d7889f9274193d2e4df9
child 509423 70ff3d9a4af6623fa830cd9335ed1e17584304ef
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1517334
milestone66.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 1517334 - [release 114] Fix cmd/ctrl+shift+b shortcut to toggle conditional breakpoint (#7589). r=dwalsh
devtools/client/debugger/new/src/components/Editor/index.js
--- a/devtools/client/debugger/new/src/components/Editor/index.js
+++ b/devtools/client/debugger/new/src/components/Editor/index.js
@@ -428,24 +428,33 @@ class Editor extends PureComponent<Props
       jumpToMappedLocation(sourceLocation);
     }
   }
 
   toggleConditionalPanel = line => {
     const {
       conditionalPanelLocation,
       closeConditionalPanel,
-      openConditionalPanel
+      openConditionalPanel,
+      selectedSource
     } = this.props;
 
     if (conditionalPanelLocation) {
       return closeConditionalPanel();
     }
 
-    return openConditionalPanel(conditionalPanelLocation);
+    if (!selectedSource) {
+      return;
+    }
+
+    return openConditionalPanel({
+      line: line,
+      sourceId: selectedSource.id,
+      sourceUrl: selectedSource.url
+    });
   };
 
   closeConditionalPanel = () => {
     return this.props.closeConditionalPanel();
   };
 
   shouldScrollToLocation(nextProps) {
     const { selectedLocation, selectedSource } = this.props;