Bug 1250427 - get correct breakpoint text if it moved in the debugger r=me
authorJames Long <longster@gmail.com>
Thu, 03 Mar 2016 12:21:16 -0500
changeset 322930 217b441ef860497f6770a27fa2ba988060ae00ed
parent 322929 7b5e74921ea3102ad308b74774d9faa836efe6d2
child 322931 0353c350097e04632e77445740a27d33f7428a2e
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1250427
milestone47.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 1250427 - get correct breakpoint text if it moved in the debugger r=me
devtools/client/debugger/content/actions/breakpoints.js
--- a/devtools/client/debugger/content/actions/breakpoints.js
+++ b/devtools/client/debugger/content/actions/breakpoints.js
@@ -61,17 +61,19 @@ function addBreakpoint(location, conditi
           condition: bp.condition
         });
         const { isPending, actualLocation } = response;
 
         // Save the client instance
         setBreakpointClient(bpClient.actor, bpClient);
 
         return {
-          text: DebuggerView.editor.getText(bp.location.line - 1).trim(),
+          text: DebuggerView.editor.getText(
+            (actualLocation ? actualLocation.line : bp.location.line) - 1
+          ).trim(),
 
           // If the breakpoint response has an "actualLocation" attached, then
           // the original requested placement for the breakpoint wasn't
           // accepted.
           actualLocation: isPending ? null : actualLocation,
           actor: bpClient.actor
         };
       })