[Pkg-mozext-commits] [firebug] 07/16: Do not create an actor for disabled bp (related to issue 7760)
David Prévot
taffit at moszumanska.debian.org
Fri Apr 10 02:19:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit 3e5789fa850435bf5cf0441dff0e2e5e840349dc
Author: Jan Odvarko <odvarko at gmail.com>
Date: Tue Mar 17 12:23:02 2015 +0100
Do not create an actor for disabled bp (related to issue 7760)
---
extension/content/firebug/debugger/breakpoints/breakpoint.js | 2 +-
extension/content/firebug/debugger/breakpoints/breakpointStore.js | 6 +++---
extension/content/firebug/debugger/breakpoints/breakpointTool.js | 8 ++++++++
extension/content/firebug/debugger/script/scriptPanel.js | 8 ++++++--
4 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/extension/content/firebug/debugger/breakpoints/breakpoint.js b/extension/content/firebug/debugger/breakpoints/breakpoint.js
index 0e66f97..da31803 100644
--- a/extension/content/firebug/debugger/breakpoints/breakpoint.js
+++ b/extension/content/firebug/debugger/breakpoints/breakpoint.js
@@ -7,7 +7,7 @@ function(FBTrace) {
// ********************************************************************************************* //
-function Breakpoint(href, lineNumber, disabled,type)
+function Breakpoint(href, lineNumber, disabled, type)
{
this.href = href;
this.lineNo = lineNumber;
diff --git a/extension/content/firebug/debugger/breakpoints/breakpointStore.js b/extension/content/firebug/debugger/breakpoints/breakpointStore.js
index ae6a4a2..5c373ee 100644
--- a/extension/content/firebug/debugger/breakpoints/breakpointStore.js
+++ b/extension/content/firebug/debugger/breakpoints/breakpointStore.js
@@ -221,7 +221,7 @@ var BreakpointStore = Obj.extend(Module,
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
- addBreakpoint: function(url, lineNo, condition, type)
+ addBreakpoint: function(url, lineNo, condition, type, disabled = false)
{
type = type || BP_NORMAL;
@@ -239,7 +239,7 @@ var BreakpointStore = Obj.extend(Module,
// will be kept otherwise removed.
if (condition != null)
{
- var bp = new Breakpoint(url, lineNo, false, type);
+ var bp = new Breakpoint(url, lineNo, disabled, type);
bp.condition = condition;
// We just need to find the actual location of a breakpoint.
@@ -270,7 +270,7 @@ var BreakpointStore = Obj.extend(Module,
if (!this.breakpoints[url])
this.breakpoints[url] = [];
- var bp = new Breakpoint(url, lineNo, false, type);
+ var bp = new Breakpoint(url, lineNo, disabled, type);
this.breakpoints[url].push(bp);
Trace.sysout("breakpointStore.addBreakpoint; NEW BP: " +
diff --git a/extension/content/firebug/debugger/breakpoints/breakpointTool.js b/extension/content/firebug/debugger/breakpoints/breakpointTool.js
index 902810c..bcaaf7e 100644
--- a/extension/content/firebug/debugger/breakpoints/breakpointTool.js
+++ b/extension/content/firebug/debugger/breakpoints/breakpointTool.js
@@ -95,6 +95,14 @@ BreakpointTool.prototype = Obj.extend(new Tool(),
{
Trace.sysout("breakpointTool.onAddBreakpoint; (" + bp.lineNo + ")", bp);
+ // Do not create server side actors for disabled breakpoints.
+ if (bp.disabled)
+ {
+ this.dispatch("onBreakpointAdded", [this.context, bp]);
+ Firebug.dispatchEvent(this.context.browser, "onBreakpointAdded", [bp]);
+ return;
+ }
+
var self = this;
this.setBreakpoint(bp.href, bp.lineNo, function(response, bpClient)
{
diff --git a/extension/content/firebug/debugger/script/scriptPanel.js b/extension/content/firebug/debugger/script/scriptPanel.js
index 256a30a..87f0da8 100644
--- a/extension/content/firebug/debugger/script/scriptPanel.js
+++ b/extension/content/firebug/debugger/script/scriptPanel.js
@@ -1490,10 +1490,14 @@ ScriptPanel.prototype = Obj.extend(BasePanel,
toggleDisableBreakpoint: function(line)
{
var currentUrl = this.getCurrentURL();
- // create breakpoint if it doesn't exist
+
var hasBreakpoint = BreakpointStore.hasBreakpoint(currentUrl, line);
if (!hasBreakpoint)
- BreakpointStore.addBreakpoint(currentUrl, line);
+ {
+ // Create disabled breakpoint if it doesn't exist yet and bail out.
+ BreakpointStore.addBreakpoint(currentUrl, line, undefined, undefined, true);
+ return;
+ }
var isDisabled = BreakpointStore.isBreakpointDisabled(currentUrl, line);
if (isDisabled)
--
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