[Pkg-mozext-commits] [firebug] 02/30: Disabled BP should not be set server-side after a refresh (related to issue 7491)

David Prévot taffit at moszumanska.debian.org
Fri Jun 20 22:34:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firebug.

commit 774f5ead5f01b79babaafe62758b862baeaadc5c
Author: Florent FAYOLLE <florent.fayolle69 at gmail.com>
Date:   Fri May 30 20:38:39 2014 +0200

    Disabled BP should not be set server-side after a refresh (related to
    issue 7491)
---
 .../firebug/debugger/breakpoints/breakpointTool.js | 24 ++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/extension/content/firebug/debugger/breakpoints/breakpointTool.js b/extension/content/firebug/debugger/breakpoints/breakpointTool.js
index e673245..37d7d80 100644
--- a/extension/content/firebug/debugger/breakpoints/breakpointTool.js
+++ b/extension/content/firebug/debugger/breakpoints/breakpointTool.js
@@ -371,8 +371,11 @@ BreakpointTool.prototype = Obj.extend(new Tool(),
 
             // Send RDP packet to set a breakpoint on the server side. The callback will be
             // executed as soon as we receive a response.
-            self.context.activeThread.setBreakpoint(location,
-                self.onSetBreakpoint.bind(self, callback));
+            if (!isNormalDisabledBreakpoint(bp))
+            {
+                self.context.activeThread.setBreakpoint(location,
+                    self.onSetBreakpoint.bind(self, callback));
+            }
         }
 
         // If the debuggee is paused, just set the breakpoint.
@@ -586,8 +589,7 @@ BreakpointTool.prototype = Obj.extend(new Tool(),
             // server-side. Also check that we only remove normal breakpoints, and not mix-typed
             // ones, because we would still need them server-side (such as monitor breakpoints).
             var bp = BreakpointStore.findBreakpoint(url, lineNumber);
-            var isNormalDisabledBP = (bp && bp.disabled && bp.type === BreakpointStore.BP_NORMAL);
-            if (!isNormalDisabledBP)
+            if (!isNormalDisabledBreakpoint(bp))
             {
                 Trace.sysout("breakpointTool.removeBreakpoint; Can't remove BP it's still " +
                     "in the store! " + url + " (" + lineNumber + ")");
@@ -786,6 +788,20 @@ function setCondition(context, bpClient, condition)
 }
 
 // ********************************************************************************************* //
+// Helpers
+
+/**
+ * Returns true if the breakpoint is disabled and is exclusively a BP_NORMAL one.
+ * @param {Breakpoint} bp The Breakpoint as defined in debugger/breakpoints/breakpoint.js
+ *
+ * @return {boolean}
+ */
+function isNormalDisabledBreakpoint(bp)
+{
+    return (bp && bp.disabled && bp.type === BreakpointStore.BP_NORMAL);
+}
+
+// ********************************************************************************************* //
 // Registration
 
 Firebug.registerTool("breakpoint", BreakpointTool);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list