Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue 4290: The script panel is taking over Firebug and it shouldn't

  • Loading branch information...
commit c0c4957f64cd9881ee6c2ae787ab7ab5f54e100e 1 parent cfcdd4e
@janodvarko janodvarko authored
View
4 extension/content/firebug/chrome/chrome.js
@@ -835,6 +835,10 @@ var FirebugChrome =
{
var panelTypes = Firebug.getMainPanelTypes(Firebug.currentContext);
panelBar1.updatePanels(panelTypes);
+
+ // Upadate also BON tab flag (orange background if BON is active)
+ // every time the user changes the current tab in Firefox.
+ Firebug.Breakpoint.updatePanelTabs(Firebug.currentContext);
}
},
View
3  extension/content/firebug/chrome/panelActivation.js
@@ -104,6 +104,9 @@ Firebug.PanelActivation = Obj.extend(Firebug.Module,
isPanelEnabled: function(panelType)
{
+ if (typeof(panelType) == "string")
+ panelType = Firebug.getPanelType("script");
+
if (!this.isPanelActivable(panelType))
return true;
View
19 extension/content/firebug/js/breakpoint.js
@@ -137,12 +137,31 @@ Firebug.Breakpoint = Obj.extend(Firebug.Module,
if (!panel)
return;
+ // If the script panels is disabled, BON can't be active.
+ if (!Firebug.PanelActivation.isPanelEnabled("script"))
+ armed = false;
+
var panelBar = Firebug.chrome.$("fbPanelBar1");
var tab = panelBar.getTab(panel.name);
if (tab)
tab.setAttribute("breakOnNextArmed", armed ? "true" : "false");
},
+ updatePanelTabs: function(context)
+ {
+ if (!context)
+ return;
+
+ var panelTypes = Firebug.getMainPanelTypes(context);
+ for (var i=0; i<panelTypes.length; ++i)
+ {
+ var panelType = panelTypes[i];
+ var panel = context.getPanel(panelType.prototype.name);
+ var shouldBreak = (panel && panel.shouldBreakOnNext()) ? true : false;
+ this.updatePanelTab(panel, shouldBreak);
+ }
+ },
+
// supports non-JS break on next
breakNow: function(panel)
{
View
4 extension/content/firebug/js/debugger.js
@@ -1346,6 +1346,10 @@ Firebug.Debugger = Obj.extend(Firebug.ActivableModule,
var context = this.breakContext;
delete this.breakContext;
+ // If the script panel is disabled, Firebug can't break on error.
+ if (!Firebug.PanelActivation.isPanelEnabled("script"))
+ return 0;
+
try
{
if (FBTrace.DBG_ERRORS)
View
4 extension/content/firebug/js/scriptPanel.js
@@ -1553,6 +1553,10 @@ Firebug.ScriptPanel.prototype = Obj.extend(Firebug.SourceBoxPanel,
Firebug.TabCacheModel.addObserver(this);
else
Firebug.TabCacheModel.removeObserver(this);
+
+ // If the Script is disabled make sure the BON tab flag (orange background)
+ // is properly updated.
+ Firebug.Breakpoint.updatePanelTabs(Firebug.currentContext);
},
// implements Tool
Please sign in to comment.
Something went wrong with that request. Please try again.