Bug 1527122 - [release 125] [Breakpoints] Prevent two active breakpoints (#7908). r=dwalsh
authorDavid Walsh <davidwalsh83@gmail.com>
Mon, 11 Feb 2019 17:00:19 -0800
changeset 458682 44491c6093d4
parent 458681 14277097be36
child 458683 745ea4fc4420
push id35544
push userccoroiu@mozilla.com
push dateTue, 12 Feb 2019 16:29:08 +0000
treeherdermozilla-central@c849fb69e2e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1527122
milestone67.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 1527122 - [release 125] [Breakpoints] Prevent two active breakpoints (#7908). r=dwalsh
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/Breakpoint.js
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/Breakpoint.js
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/Breakpoint.js
@@ -11,17 +11,18 @@ import classnames from "classnames";
 import actions from "../../../actions";
 import { memoize } from "lodash";
 
 import showContextMenu from "./BreakpointsContextMenu";
 import { CloseButton } from "../../shared/Button";
 
 import {
   getLocationWithoutColumn,
-  getSelectedText
+  getSelectedText,
+  makeBreakpointId
 } from "../../../utils/breakpoint";
 import { getSelectedLocation } from "../../../utils/source-maps";
 import { features } from "../../../utils/prefs";
 import { getEditor } from "../../../utils/editor";
 
 import type {
   Breakpoint as BreakpointType,
   Frame,
@@ -97,18 +98,22 @@ class Breakpoint extends PureComponent<P
   };
 
   isCurrentlyPausedAtBreakpoint() {
     const { frame } = this.props;
     if (!frame) {
       return false;
     }
 
-    const bpId = getLocationWithoutColumn(this.selectedLocation);
-    const frameId = getLocationWithoutColumn(frame.selectedLocation);
+    const bpId = features.columnBreakpoints
+      ? makeBreakpointId(this.selectedLocation)
+      : getLocationWithoutColumn(this.selectedLocation);
+    const frameId = features.columnBreakpoints
+      ? makeBreakpointId(frame.selectedLocation)
+      : getLocationWithoutColumn(frame.selectedLocation);
     return bpId == frameId;
   }
 
   getBreakpointLocation() {
     const { source } = this.props;
     const { column, line } = this.selectedLocation;
 
     const isWasm = source && source.isWasm;