[Pkg-mozext-commits] [firebug] 01/30: Issue 7491: A disabled breakpoint slows down Javascript execution

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 8c485777535109371183fe3e259a6c25b2a18e94
Author: Florent FAYOLLE <florent.fayolle69 at gmail.com>
Date:   Fri May 30 19:10:18 2014 +0200

    Issue 7491:  A disabled breakpoint slows down Javascript execution
---
 .../firebug/debugger/breakpoints/breakpointTool.js   | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/extension/content/firebug/debugger/breakpoints/breakpointTool.js b/extension/content/firebug/debugger/breakpoints/breakpointTool.js
index 74386c3..e673245 100644
--- a/extension/content/firebug/debugger/breakpoints/breakpointTool.js
+++ b/extension/content/firebug/debugger/breakpoints/breakpointTool.js
@@ -582,13 +582,21 @@ BreakpointTool.prototype = Obj.extend(new Tool(),
         // breakpoint at the line.
         if (BreakpointStore.hasAnyBreakpoint(url, lineNumber))
         {
-            Trace.sysout("breakpointTool.removeBreakpoint; Can't remove BP it's still " +
-                "in the store! " + url + " (" + lineNumber + ")");
+            // A disabled breakpoint remains in the breakpoint store but has to be removed
+            // 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)
+            {
+                Trace.sysout("breakpointTool.removeBreakpoint; Can't remove BP it's still " +
+                    "in the store! " + url + " (" + lineNumber + ")");
 
-            // xxxHonza: the callback expects a packet as an argument, it should not.
-            if (callback)
-                callback({});
-            return;
+                // xxxHonza: the callback expects a packet as an argument, it should not.
+                if (callback)
+                    callback({});
+                return;
+            }
         }
 
         // We need to get the breakpoint client object for this context. The client

-- 
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