From c95ab93b94cb851bfa74dc5c435dc32e1d9b9500 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 17 Mar 2015 16:19:05 +0100 Subject: [PATCH 01/73] Issue 7717: Gray space on resize when UI is attached to the top --- extension/content/firebug/chrome/chrome.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/chrome/chrome.js b/extension/content/firebug/chrome/chrome.js index 0463e739b3..1f9963a2a3 100644 --- a/extension/content/firebug/chrome/chrome.js +++ b/extension/content/firebug/chrome/chrome.js @@ -499,9 +499,9 @@ var FirebugChrome = if (!this.inDetachedScope) { - Dom.collapse(Firefox.getElementById('fbMainFrame'), !shouldShow); + Dom.collapse(Firefox.getElementById("fbMainFrame"), !shouldShow); - var contentSplitter = Firefox.getElementById('fbContentSplitter'); + var contentSplitter = Firefox.getElementById("fbContentSplitter"); if (contentSplitter) contentSplitter.setAttribute("collapsed", !shouldShow); } @@ -1040,6 +1040,17 @@ var FirebugChrome = splitter.setAttribute("dir", after ? "" : "reverse"); container.insertBefore(splitter, after ? null: container.firstChild); + // See: https://code.google.com/p/fbug/issues/detail?id=7717 + // There is a new element placed whihin + // the right before . + // If Firebug is positioned at the top, the splitter must + // change height of the tab-browser (which is using 'flex') + // not height of the . + if (pos == "top") + splitter.setAttribute("resizeafter", "flex"); + else + splitter.removeAttribute("resizeafter"); + var frame = document.getElementById("fbMainFrame"); var newFrame = frame.cloneNode(true); From 60b1627f82a2634532dd6146f1a3678a276ad954 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Wed, 18 Mar 2015 17:26:04 +0100 Subject: [PATCH 02/73] Update locale: fr (related to issue 7696) --- extension/locale/fr/firebug.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/locale/fr/firebug.properties b/extension/locale/fr/firebug.properties index bea634989a..d33758c0cd 100755 --- a/extension/locale/fr/firebug.properties +++ b/extension/locale/fr/firebug.properties @@ -1491,7 +1491,7 @@ script.suggestion.no_system_source_debugging2=Firebug ne peut actuellement être # Message displayed in the Script panel, if the page doesn't include any JavaScript. # The suggestion message represents an advice how to solve the problem. script.warning.no_javascript=Pas de JavaScript sur cette page -script.suggestion.no_javascript2=Si les balises

Issue 4818: - frame.eval fails for everthing but the newest frame of the stack

+ frame.eval fails for everything but the newest frame of the stack
diff --git a/tests/content/script/breakpoints/7478/issue7478.js b/tests/content/script/breakpoints/7478/issue7478.js index fe1605fb11..28f40263ad 100644 --- a/tests/content/script/breakpoints/7478/issue7478.js +++ b/tests/content/script/breakpoints/7478/issue7478.js @@ -26,7 +26,7 @@ function runTest() var conditionEditor = scriptPanel. panelNode.querySelector(".conditionEditor"); - FBTest.ok(conditionEditor, "The condtion editor should display to the user."); + FBTest.ok(conditionEditor, "The condition editor should display to the user."); FBTest.testDone(); }); } diff --git a/tests/content/search/6435/issue6435.html b/tests/content/search/6435/issue6435.html index 0d03c8d827..773520ab7e 100644 --- a/tests/content/search/6435/issue6435.html +++ b/tests/content/search/6435/issue6435.html @@ -17,9 +17,9 @@

Steps to reproduce

  • Open Firebug, select the DOM panel
  • Make sure 'Show DOM Properties' option is off.
  • Use the search box to search in the panel
  • -
  • There should be 4 occurences of 'test' (case insensitive)
  • -
  • There should be 2 occurences of 'Test' (case sensitive)
  • -
  • There should be 2 occurences of '21' (case sensitive)
  • +
  • There should be 4 occurrences of 'test' (case insensitive)
  • +
  • There should be 2 occurrences of 'Test' (case sensitive)
  • +
  • There should be 2 occurrences of '21' (case sensitive)
  • Jan Odvarko, <odvarko@gmail.com>
    diff --git a/tests/content/search/6435/issue6435.js b/tests/content/search/6435/issue6435.js index 41987c7ff3..6a05990d11 100644 --- a/tests/content/search/6435/issue6435.js +++ b/tests/content/search/6435/issue6435.js @@ -17,7 +17,7 @@ function runTest() executeSearchTest("test", false, false, function(counter) { FBTest.compare(4, counter, "There must be precise number " + - "of occurences (4) actual: " + counter); + "of occurrences (4) actual: " + counter); callback(); }); }); @@ -28,7 +28,7 @@ function runTest() executeSearchTest("test", false, true, function(counter) { FBTest.compare(2, counter, "There must be precise number " + - "of occurences (2) actual: " + counter); + "of occurrences (2) actual: " + counter); callback(); }); }); @@ -39,7 +39,7 @@ function runTest() executeSearchTest("21", false, false, function(counter) { FBTest.compare(2, counter, "There must be precise number " + - "of occurences (2) actual: " + counter); + "of occurrences (2) actual: " + counter); callback(); }); }); @@ -71,7 +71,7 @@ function executeSearchTest(text, reverse, caseSensitive, callback) var match = sel.getRangeAt(0); - // OK, we have found the first occurence again, so finish the test. + // OK, we have found the first occurrence again, so finish the test. FBTest.sysout("search.match; ", match); if (firstMatch && (firstMatch.compareBoundaryPoints(Range.START_TO_START, match) || firstMatch.compareBoundaryPoints(Range.END_TO_END, match)) == 0) diff --git a/tests/content/search/6454/issue6454.js b/tests/content/search/6454/issue6454.js index 6c499a1b2a..1202d75ed7 100644 --- a/tests/content/search/6454/issue6454.js +++ b/tests/content/search/6454/issue6454.js @@ -51,7 +51,7 @@ function executeSearchTest(text, reverse, caseSensitive, callback) var match = sel.getRangeAt(0); - // OK, we have found the first occurence again, so finish the test. + // OK, we have found the first occurrence again, so finish the test. FBTest.sysout("search.match; ", match); if (firstMatch && (firstMatch.compareBoundaryPoints(Range.START_TO_START, match) || firstMatch.compareBoundaryPoints(Range.END_TO_END, match)) == 0) diff --git a/tests/content/search/netPanelSearch.js b/tests/content/search/netPanelSearch.js index 2c1e99af72..feb81d2738 100644 --- a/tests/content/search/netPanelSearch.js +++ b/tests/content/search/netPanelSearch.js @@ -82,7 +82,7 @@ function executeSearchTest(text, reverse, caseSensitive, responseBody, callback) var match = sel.getRangeAt(0); - // OK, we have found the first occurence again, so finish the test. + // OK, we have found the first occurrence again, so finish the test. FBTest.sysout("search.match; ", match); if (firstMatch && (firstMatch.compareBoundaryPoints(Range.START_TO_START, match) || firstMatch.compareBoundaryPoints(Range.END_TO_END, match)) == 0) diff --git a/tests/content/test-bot.html b/tests/content/test-bot.html index 221c384714..cfbba44667 100644 --- a/tests/content/test-bot.html +++ b/tests/content/test-bot.html @@ -264,7 +264,7 @@ {group: "script", uri: "script/4213/issue4213.js", desc: "Script panel's location button is not updated", testPage: "script/4213/issue4213.html"}, //{group: "script", uri: "script/4724/issue4724.js", desc: ""Disable Breakpoint" is not checked on disabled breakpoints", testPage: "script/4724/issue4724.html"}, {group: "script", uri: "script/4816/issue4816.js", desc: "Script panel claims No JavaScript when it means you're stopped on a breakpoint on some other tab", testPage: "script/4816/issue4816.html"}, - {group: "script", uri: "script/4818/issue4818.js", desc: "frame.eval fails for everthing but the newest frame of the stack", testPage: "script/4818/issue4818.html"}, + {group: "script", uri: "script/4818/issue4818.js", desc: "frame.eval fails for everything but the newest frame of the stack", testPage: "script/4818/issue4818.html"}, //{group: "script", uri: "script/4932/issue4932.js", desc: "The Script panel shows No Javascript on this page even if they are scripts within an iframe", testPage: "script/4932/issue4932.html"}, {group: "script/breakpoints", uri: "script/breakpoints/4854/issue4854.js", desc: "Issue 4854: XHR breakpoints can't be removed from Breakpoints side panel", testPage: "script/breakpoints/4854/issue4854.html"}, {group: "script/breakpoints", uri: "script/breakpoints/4889/issue4889.js", desc: "Issue 4889: Folding for breakpoint categories", testPage: "script/breakpoints/4889/issue4889.html"}, diff --git a/trace/FBTrace/chrome/content/lib/domplate.js b/trace/FBTrace/chrome/content/lib/domplate.js index 38a1143bb9..e06803128e 100644 --- a/trace/FBTrace/chrome/content/lib/domplate.js +++ b/trace/FBTrace/chrome/content/lib/domplate.js @@ -89,7 +89,7 @@ DomplateTag.prototype = * Initializer for DOM templates. Called to create new Functions objects like TR, TD, * OBJLINK, etc. See defineTag * - * @param args keyword argments for the template, the {} brace stuff after the tag name, + * @param args keyword arguments for the template, the {} brace stuff after the tag name, * eg TR({...}, TD(... * @param oldTag a nested tag, eg the TD tag in TR({...}, TD(... */ @@ -751,7 +751,7 @@ DomplateLoop.prototype = copyObject(DomplateTag.prototype, var iterName; if (this.iter instanceof Parts) { - // We have a function with optional aruments or just one variable + // We have a function with optional arguments or just one variable var part = this.iter.parts[0]; // Join our function arguments or variables diff --git a/trace/FBTrace/modules/orion/orion.js b/trace/FBTrace/modules/orion/orion.js index 06ad42195a..b6280192a2 100644 --- a/trace/FBTrace/modules/orion/orion.js +++ b/trace/FBTrace/modules/orion/orion.js @@ -4113,7 +4113,7 @@ define("orion/textview/textView", ['orion/textview/textModel', 'orion/textview/k * Executes the action handler associated with the given name. *

    * The application defined action takes precedence over predefined actions unless - * the defaultAction paramater is true. + * the defaultAction parameter is true. *

    *

    * If the application defined action returns false, the text view predefined @@ -7020,7 +7020,7 @@ define("orion/textview/textView", ['orion/textview/textModel', 'orion/textview/k if (!isWebkit) { /* * Feature in IE and Firefox. It is not possible to get the style of an - * element if it is not layed out because one of the ancestor has + * element if it is not laid out because one of the ancestor has * style.display = none. This means that the view cannot be created in this * situations, since no measuring can be performed. The fix is to listen * for DOMAttrModified and create or destroy the view when the style.display @@ -11281,7 +11281,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( ]; // Scanner constants - var UNKOWN = 1; + var UNKNOWN = 1; var KEYWORD = 2; var STRING = 3; var SINGLELINE_COMMENT = 4; @@ -11365,7 +11365,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( } } } - return UNKOWN; + return UNKNOWN; } }, _read: function() { @@ -11417,7 +11417,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( } } this._unread(c); - return UNKOWN; + return UNKNOWN; case 39: // SINGLE QUOTE -> char const while(true) { c = this._read(); @@ -11483,7 +11483,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( c = this._read(); } while(!(c === 32 || c === 9 || c === -1)); this._unread(c); - return UNKOWN; + return UNKNOWN; } } }; @@ -11520,7 +11520,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( return HTML_MARKUP; } } - return UNKOWN; + return UNKNOWN; case 64: // @ if (this._type === DOC_COMMENT) { do { @@ -11529,7 +11529,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( this._unread(c); return DOC_TAG; } - return UNKOWN; + return UNKNOWN; case 84: // T if ((c = this._read()) === 79) { // O if ((c = this._read()) === 68) { // D @@ -11555,7 +11555,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( c = this._read(); } while(!(c === 32 || c === 9 || c === -1 || c === 60 || c === 64 || c === 84)); this._unread(c); - return UNKOWN; + return UNKNOWN; } } }; @@ -11573,7 +11573,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( case 39: // SINGLE QUOTE case -1: this._unread(c); - return UNKOWN; + return UNKNOWN; } } }; diff --git a/trace/FBTrace/modules/orion/source-editor.jsm b/trace/FBTrace/modules/orion/source-editor.jsm index 7877bcb460..2306391eb3 100644 --- a/trace/FBTrace/modules/orion/source-editor.jsm +++ b/trace/FBTrace/modules/orion/source-editor.jsm @@ -184,7 +184,7 @@ SourceEditor.EVENTS = { * The TextChanged event is fired when the editor content changes. The event * object properties: * - start - the character offset in the document where the change has - * occured. + * occurred. * - removedCharCount - the number of characters removed from the document. * - addedCharCount - the number of characters added to the document. */ From 137d302e0777b707c9bc7c32d0fc935411bc4332 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Mon, 10 Aug 2015 15:38:49 +0200 Subject: [PATCH 24/73] #7918 The Script panel does not show any script when reopening Firebug in Fx 39 --- extension/content/firebug/remoting/debuggerClient.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extension/content/firebug/remoting/debuggerClient.js b/extension/content/firebug/remoting/debuggerClient.js index c8ecb1d7d7..3f54fdbd28 100644 --- a/extension/content/firebug/remoting/debuggerClient.js +++ b/extension/content/firebug/remoting/debuggerClient.js @@ -405,6 +405,12 @@ var DebuggerClient = Obj.extend(Firebug.Module, onThreadAttached: function(context) { + // "newSource" events are emitted by thread-actor now. + // https://hg.mozilla.org/integration/mozilla-inbound/rev/152f968b6b13 + // https://github.com/firebug/firebug/issues/7918 + // https://bugzilla.mozilla.org/show_bug.cgi?id=1171967 + context.activeThread.addListener("newSource", this.newSource); + this.dispatch("onThreadAttached", [context, false]); Firebug.dispatchEvent(context.browser, "onThreadAttached"); @@ -412,6 +418,8 @@ var DebuggerClient = Obj.extend(Firebug.Module, onThreadDetached: function(context) { + context.activeThread.removeListener("newSource"); + this.dispatch("onThreadDetached", [context]); Firebug.dispatchEvent(context.browser, "onThreadDetached"); From d1a4e3d19a30217d25e0de4ea6bfb02f1060dec8 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 11 Aug 2015 14:20:07 +0200 Subject: [PATCH 25/73] [firebug-2.0.12b1] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 6 +++--- extension/install.rdf.tpl.xml | 4 ++-- extension/update.rdf.tpl.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index c9f12cf85b..24463507ff 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.11 +RELEASE=.12b1 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 482fd4997e..4dc9f43c2a 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.11 + 2.0.12b1 2 true @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 41.0 + 42.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 41.0 + 42.0 diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index cbfe6cbbc9..5db43982d2 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 41.0 + 42.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 41.0 + 42.0 diff --git a/extension/update.rdf.tpl.xml b/extension/update.rdf.tpl.xml index 5637fff4f9..6b0d2a2ab3 100644 --- a/extension/update.rdf.tpl.xml +++ b/extension/update.rdf.tpl.xml @@ -12,7 +12,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 41.0 + 42.0 https://getfirebug.com/releases/firebug/@VERSION@/@LEAF@ https://getfirebug.com/updateInfo/firebug2.0.xml From 305f4912b6a476bfc2ab1b7c174d826892b1863a Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 11 Aug 2015 14:22:42 +0200 Subject: [PATCH 26/73] [firebug-2.0.12] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 24463507ff..d9416a981f 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.12b1 +RELEASE=.12 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 4dc9f43c2a..7aecf297a1 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.12b1 + 2.0.12 2 true From 34d4f1c3bb130d65c01830c2cac0d30bbf71d5ff Mon Sep 17 00:00:00 2001 From: Simon Lindholm Date: Sat, 29 Aug 2015 10:30:53 +0200 Subject: [PATCH 27/73] Cope with renamed API evalInGlobal -> executeInGlobal (bug 1193583) --- .../content/firebug/console/commandLineExposed.js | 11 +++++++---- extension/content/firebug/debugger/debuggerLib.js | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/extension/content/firebug/console/commandLineExposed.js b/extension/content/firebug/console/commandLineExposed.js index dbaa0e7911..4b8ebe5468 100644 --- a/extension/content/firebug/console/commandLineExposed.js +++ b/extension/content/firebug/console/commandLineExposed.js @@ -237,8 +237,8 @@ function evaluateInGlobal(context, win, expr, origExpr, onSuccess, onError, opti { var dbgGlobal = DebuggerLib.getInactiveDebuggeeGlobal(context, win); var evalMethod = options.noCmdLineAPI ? - dbgGlobal.evalInGlobal : - dbgGlobal.evalInGlobalWithBindings; + (dbgGlobal.executeInGlobal || dbgGlobal.evalInGlobal) : + (dbgGlobal.executeInGlobalWithBindings || dbgGlobal.evalInGlobalWithBindings); var args = [dbgGlobal, evalMethod, dbgGlobal]; args.push.apply(args, arguments); @@ -528,8 +528,11 @@ function executeInWindowContext(win, func, args, dbgGlobal) var code = "(function() { callback(); })"; var bindings = Object.create(null); bindings.callback = dbgGlobal.makeDebuggeeValue(listener); - var listenerInWindow = dbgGlobal.evalInGlobalWithBindings(code, bindings) - .return.unsafeDereference(); + var listenerInWindow = ( + dbgGlobal.executeInGlobalWithBindings ? + dbgGlobal.executeInGlobalWithBindings(code, bindings) : + dbgGlobal.evalInGlobalWithBindings(code, bindings) + ).return.unsafeDereference(); win.document.addEventListener("firebugCommandLine", listenerInWindow); diff --git a/extension/content/firebug/debugger/debuggerLib.js b/extension/content/firebug/debugger/debuggerLib.js index 4360ed9b36..a11b36a044 100644 --- a/extension/content/firebug/debugger/debuggerLib.js +++ b/extension/content/firebug/debugger/debuggerLib.js @@ -552,7 +552,9 @@ DebuggerLib.breakNow = function(context) // but we might want to change what global to use here. var global = context.getCurrentGlobal(); var dbgGlobal = this.getInactiveDebuggeeGlobal(context, global); - return dbgGlobal.evalInGlobal("debugger;"); + return dbgGlobal.executeInGlobal ? + dbgGlobal.executeInGlobal("debugger;") : + dbgGlobal.evalInGlobal("debugger;"); } }; From 95310817ee82b8dbf66b6e2e6098ddeb84232114 Mon Sep 17 00:00:00 2001 From: Florent Fayolle Date: Thu, 1 Oct 2015 13:36:15 +0200 Subject: [PATCH 28/73] #7948 Fix "href is null" appearing in the console The backend may send a null source location in for a frame. --- extension/content/firebug/debugger/stack/stackFrame.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/content/firebug/debugger/stack/stackFrame.js b/extension/content/firebug/debugger/stack/stackFrame.js index 12c91fd409..ec04a13c86 100644 --- a/extension/content/firebug/debugger/stack/stackFrame.js +++ b/extension/content/firebug/debugger/stack/stackFrame.js @@ -354,7 +354,7 @@ StackFrame.removeChromeFrames = function(trace) for (var i = 0; i < frames.length; i++) { var href = frames[i].href; - if (href.startsWith("chrome:") || href.startsWith("resource:")) + if (href && (href.startsWith("chrome:") || href.startsWith("resource:"))) continue; // xxxFlorent: should be reverted if we integrate From cad92596f2c287f75d7ac4850e68a22a9abfc405 Mon Sep 17 00:00:00 2001 From: Florent FAYOLLE Date: Mon, 5 Oct 2015 20:54:37 +0200 Subject: [PATCH 29/73] #7948 don't display null locations in console.error callstack --- extension/content/firebug/debugger/stack/stackFrame.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/content/firebug/debugger/stack/stackFrame.js b/extension/content/firebug/debugger/stack/stackFrame.js index ec04a13c86..0dd7db77a7 100644 --- a/extension/content/firebug/debugger/stack/stackFrame.js +++ b/extension/content/firebug/debugger/stack/stackFrame.js @@ -354,7 +354,7 @@ StackFrame.removeChromeFrames = function(trace) for (var i = 0; i < frames.length; i++) { var href = frames[i].href; - if (href && (href.startsWith("chrome:") || href.startsWith("resource:"))) + if (!href || href.startsWith("chrome:") || href.startsWith("resource:")) continue; // xxxFlorent: should be reverted if we integrate From 8b2e1e2c289fc888649abf6c5f3e56fa572ecbcf Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 6 Oct 2015 14:31:36 +0200 Subject: [PATCH 30/73] #7952 Update DevTools modules path --- .../console/commands/commandLineInclude.js | 7 ++- extension/content/firebug/console/console.js | 9 ++-- .../content/firebug/css/computedPanel.js | 9 ++-- extension/content/firebug/lib/devtools.js | 53 +++++++++++++++++++ extension/content/firebug/lib/object.js | 14 ++--- 5 files changed, 76 insertions(+), 16 deletions(-) create mode 100644 extension/content/firebug/lib/devtools.js diff --git a/extension/content/firebug/console/commands/commandLineInclude.js b/extension/content/firebug/console/commands/commandLineInclude.js index 88091c3e4b..98d29228f8 100644 --- a/extension/content/firebug/console/commands/commandLineInclude.js +++ b/extension/content/firebug/console/commands/commandLineInclude.js @@ -41,8 +41,11 @@ var ScratchpadManager; try { - var scope = {}; - Cu.import("resource:///modules/devtools/scratchpad-manager.jsm", scope); + // Module paths have changed, see also: https://bugzilla.mozilla.org/show_bug.cgi?id=912121 + var scope = System.importModule([ + "resource:///modules/devtools/client/scratchpad/scratchpad-manager.jsm", + "resource:///modules/devtools/scratchpad-manager.jsm + ]); ScratchpadManager = scope.ScratchpadManager; } catch(ex) diff --git a/extension/content/firebug/console/console.js b/extension/content/firebug/console/console.js index 282a2fa5f3..6947ede84c 100644 --- a/extension/content/firebug/console/console.js +++ b/extension/content/firebug/console/console.js @@ -10,6 +10,7 @@ define([ "firebug/lib/wrapper", "firebug/lib/xml", "firebug/lib/options", + "firebug/lib/devtools", "firebug/chrome/window", "firebug/chrome/firefox", "firebug/chrome/panelNotification", @@ -21,7 +22,7 @@ define([ "firebug/dom/domBaseTree", "firebug/remoting/debuggerClient", ], -function(Firebug, FBTrace, Obj, Events, Locale, Search, Wrapper, Xml, Options, Win, Firefox, +function(Firebug, FBTrace, Obj, Events, Locale, Search, Wrapper, Xml, Options, DevTools, Win, Firefox, PanelNotification, ActivableModule, ConsoleBase, SourceLink, StackFrame, StackTrace, DomBaseTree, DebuggerClient) { @@ -30,9 +31,9 @@ function(Firebug, FBTrace, Obj, Events, Locale, Search, Wrapper, Xml, Options, W // ********************************************************************************************* // // Constants -var Cu = Components.utils; -var scope = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -var {ConsoleAPIListener} = scope.devtools.require("devtools/toolkit/webconsole/utils"); +var {ConsoleAPIListener} = DevTools.safeRequire(DevTools.devtools, + "devtools/shared/webconsole/utils", + "devtools/toolkit/webconsole/utils"); var defaultReturnValue = Object.preventExtensions(Object.create(null)); diff --git a/extension/content/firebug/css/computedPanel.js b/extension/content/firebug/css/computedPanel.js index c4d64eb904..8e984b9ec9 100644 --- a/extension/content/firebug/css/computedPanel.js +++ b/extension/content/firebug/css/computedPanel.js @@ -14,6 +14,7 @@ define([ "firebug/lib/string", "firebug/lib/url", "firebug/lib/xml", + "firebug/lib/devtools", "firebug/chrome/menu", "firebug/chrome/panel", "firebug/css/cssModule", @@ -22,7 +23,7 @@ define([ "firebug/debugger/script/sourceLink", ], function(Firebug, Arr, Css, Dom, Domplate, Events, Locale, Obj, Options, Persist, Str, Url, Xml, - Menu, Panel, CSSModule, CSSReps, LoadHandler, SourceLink) { + DevTools, Menu, Panel, CSSModule, CSSReps, LoadHandler, SourceLink) { "use strict"; @@ -42,9 +43,9 @@ try { // Firefox 24 // waiting for: https://bugzilla.mozilla.org/show_bug.cgi?id=867595 - var scope = {} - Cu.import("resource://gre/modules/devtools/Loader.jsm", scope); - var {CssLogic} = scope.devtools.require("devtools/styleinspector/css-logic"); + var {CssLogic} = DevTools.safeRequire(DevTools.devtools, + "devtools/shared/styleinspector/css-logic", + "devtools/styleinspector/css-logic"); } catch (e) { diff --git a/extension/content/firebug/lib/devtools.js b/extension/content/firebug/lib/devtools.js new file mode 100644 index 0000000000..d4aab0f355 --- /dev/null +++ b/extension/content/firebug/lib/devtools.js @@ -0,0 +1,53 @@ +/* See license.txt for terms of usage */ +/*global define:1, Components:1, Window:1*/ + +define([ +], +function() { + +"use strict"; + +var Cu = Components.utils; + +var exports = {}; + +// Support for new devtools modules path. +// See also: +// * https://wiki.mozilla.org/DevTools/Hacking +// * https://github.com/jryans/devtools-migrate/blob/master/README.md +// * https://developer.mozilla.org/en-US/docs/Tools/Contributing +// * https://bugzilla.mozilla.org/show_bug.cgi?id=912121 +try { + exports.devtools = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}).devtools; + exports.DevToolsUtils = exports.devtools["require"]("devtools/shared/DevToolsUtils"); +} catch(e) { + exports.devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools; + exports.DevToolsUtils = exports.devtools["require"]("devtools/toolkit/DevToolsUtils"); +} + +exports.require = exports.devtools["require"]; + +/** + * Allows requiring a devtools module and specify alternative locations + * to keep backward compatibility in case when the module location changes. + * It helps Firebug to support multiple Firefox versions. + * + * @param {Object} devtools Reference to DevTools module. + * @param {Array} locations List of URLs to try when importing the module. + * @returns Scope of the imported module or an empty scope if module wasn't successfully loaded. + */ +exports.safeRequire = function(devtools, ...args) { + for (var i=0; i Date: Tue, 6 Oct 2015 15:01:22 +0200 Subject: [PATCH 31/73] Fix typo --- .../content/firebug/console/commands/commandLineInclude.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/content/firebug/console/commands/commandLineInclude.js b/extension/content/firebug/console/commands/commandLineInclude.js index 98d29228f8..fe54fb1a01 100644 --- a/extension/content/firebug/console/commands/commandLineInclude.js +++ b/extension/content/firebug/console/commands/commandLineInclude.js @@ -44,7 +44,7 @@ try // Module paths have changed, see also: https://bugzilla.mozilla.org/show_bug.cgi?id=912121 var scope = System.importModule([ "resource:///modules/devtools/client/scratchpad/scratchpad-manager.jsm", - "resource:///modules/devtools/scratchpad-manager.jsm + "resource:///modules/devtools/scratchpad-manager.jsm" ]); ScratchpadManager = scope.ScratchpadManager; } From 10a085b18ac0e975840eaf11ea2f690a4843a341 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Fri, 9 Oct 2015 14:19:38 +0200 Subject: [PATCH 32/73] [firebug-2.0.13b1] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 6 +++--- extension/update.rdf.tpl.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index d9416a981f..df27719683 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.12 +RELEASE=.13b1 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 7aecf297a1..f159ad46e3 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.12 + 2.0.13b1 2 true @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 42.0 + 45.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 42.0 + 45.0 diff --git a/extension/update.rdf.tpl.xml b/extension/update.rdf.tpl.xml index 6b0d2a2ab3..9e344c621b 100644 --- a/extension/update.rdf.tpl.xml +++ b/extension/update.rdf.tpl.xml @@ -12,7 +12,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 42.0 + 45.0 https://getfirebug.com/releases/firebug/@VERSION@/@LEAF@ https://getfirebug.com/updateInfo/firebug2.0.xml From 832c9870945102f1fd9a67f30f899284afc30d7e Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Fri, 9 Oct 2015 14:21:45 +0200 Subject: [PATCH 33/73] [firebug-2.0.13] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index df27719683..5f76de746d 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.13b1 +RELEASE=.13 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index f159ad46e3..9da029c0bc 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.13b1 + 2.0.13 2 true From 93abc19ebdd309ed87de2cbb4916c023d0a97335 Mon Sep 17 00:00:00 2001 From: Florent FAYOLLE Date: Tue, 13 Oct 2015 22:04:46 +0200 Subject: [PATCH 34/73] #7954 Many evaluated expression are listed in the script panel --- extension/content/firebug/debugger/script/sourceTool.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension/content/firebug/debugger/script/sourceTool.js b/extension/content/firebug/debugger/script/sourceTool.js index 1b90f83aa4..813b291d7a 100644 --- a/extension/content/firebug/debugger/script/sourceTool.js +++ b/extension/content/firebug/debugger/script/sourceTool.js @@ -155,7 +155,8 @@ SourceTool.prototype = Obj.extend(new Tool(), { // Ignore scripts generated from 'clientEvaluate' packets. These scripts are // created e.g. as the user is evaluating expressions in the watch window. - if (DebuggerLib.isFrameLocationEval(script.url)) + if (script.introductionType === "debugger eval" || + DebuggerLib.isFrameLocationEval(script.url)) { Trace.sysout("sourceTool.addScript; A script ignored " + script.type + ", " + script.url, script); From 8db08d3a4607558b28645090450c819cc092ba7b Mon Sep 17 00:00:00 2001 From: Florent FAYOLLE Date: Mon, 2 Nov 2015 22:18:24 +0100 Subject: [PATCH 35/73] #7964 JSON previews should ignore comments at the start of the content --- extension/content/firebug/lib/json.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/lib/json.js b/extension/content/firebug/lib/json.js index c81ad32a37..9015bd63a9 100644 --- a/extension/content/firebug/lib/json.js +++ b/extension/content/firebug/lib/json.js @@ -70,9 +70,10 @@ Json.parseJSONString = function(jsonString, originURL) } catch (exc) {} - // Give up if we don't have valid start, to avoid some unnecessary overhead. + // Give up if we don't have valid start, to avoid some unnecessary overhead, + // and if we don't start with comments (pseudoJsonToJson is meant to strip them). first = firstNonWs(jsonString); - if (first !== "[" && first !== "{" && isNaN(first) && first !== '"') + if (first !== "[" && first !== "{" && isNaN(first) && first !== '"' && first !== "/") return null; // Remove JavaScript comments, quote non-quoted identifiers, and merge From 8e7d1a68c8c3bd1a20f38831b3b8585e1db7d54b Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Wed, 4 Nov 2015 13:22:17 +0100 Subject: [PATCH 36/73] #7961 Stack traces broken by bug 863089 --- extension/content/firebug/console/errorStackTraceObserver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/content/firebug/console/errorStackTraceObserver.js b/extension/content/firebug/console/errorStackTraceObserver.js index c1ef6b0532..92c19aac66 100644 --- a/extension/content/firebug/console/errorStackTraceObserver.js +++ b/extension/content/firebug/console/errorStackTraceObserver.js @@ -154,7 +154,7 @@ var ErrorStackTraceObserver = Obj.extend(Module, if (!sourceFile) sourceFile = {href: script.url}; - var line = script.getOffsetLine(state.offsets[i]); + var line = script.getOffsetLocation(state.offsets[i]).lineNumber; var args = state.argCopies[i]; var stackFrame = new StackFrame(sourceFile, line, state.frameNames[i], From de15ffbe40b5027ffa1aa0c93632e2fd4ae529f7 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Wed, 4 Nov 2015 13:25:21 +0100 Subject: [PATCH 37/73] #7961 Stack traces broken by bug 863089 --- .../firebug/console/errorStackTraceObserver.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/console/errorStackTraceObserver.js b/extension/content/firebug/console/errorStackTraceObserver.js index 92c19aac66..f42445d22d 100644 --- a/extension/content/firebug/console/errorStackTraceObserver.js +++ b/extension/content/firebug/console/errorStackTraceObserver.js @@ -154,9 +154,17 @@ var ErrorStackTraceObserver = Obj.extend(Module, if (!sourceFile) sourceFile = {href: script.url}; - var line = script.getOffsetLocation(state.offsets[i]).lineNumber; - var args = state.argCopies[i]; + var line; + + // getOffsetLocation has been introduced in Firefox 44 (Fx44) + // https://bugzilla.mozilla.org/show_bug.cgi?id=863089 + // https://github.com/firebug/firebug/issues/7961 + if (typeof script.getOffsetLocation == "function") + line = script.getOffsetLocation(state.offsets[i]).lineNumber; + else + line = script.getOffsetLine(state.offsets[i]); + var args = state.argCopies[i]; var stackFrame = new StackFrame(sourceFile, line, state.frameNames[i], args, null, 0, context); trace.frames.push(stackFrame); From 887c7221ddef7c6276a7b39edf501af44194d810 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Thu, 5 Nov 2015 18:43:22 +0100 Subject: [PATCH 38/73] #7956 Edit variables don't work when execution is stopped --- extension/content/firebug/debugger/debuggerLib.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/extension/content/firebug/debugger/debuggerLib.js b/extension/content/firebug/debugger/debuggerLib.js index a11b36a044..486e9af217 100644 --- a/extension/content/firebug/debugger/debuggerLib.js +++ b/extension/content/firebug/debugger/debuggerLib.js @@ -43,6 +43,10 @@ DebuggerLib.unwrapDebuggeeValue = function(obj) if (typeof obj !== "object" || obj === null) return obj; + if (typeof obj.unsafeDereference != "function") { + return; + } + return Wrapper.unwrapObject(obj.unsafeDereference()); }; @@ -147,6 +151,17 @@ DebuggerLib.getObject = function(context, actorId) if (!actor && threadActor._pausePool) actor = threadActor._pausePool.get(actorId); + // Check also the youngest frame that contains objects + // living in the scope. + // We could also iterate all frames through: threadActor.framePool, + // but it could have an impact on performance since this method + // is called quite often. It would have to be tested carefully. + if (!actor && threadActor.youngestFrame && + threadActor.youngestFrame.actor && + threadActor.youngestFrame.actor.frameLifetimePool) { + actor = threadActor.youngestFrame.actor.frameLifetimePool.get(actorId); + } + if (!actor) return null; From 568d87dccfbdb310cf39b8cd29348d20253919ee Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 26 Jan 2016 08:32:31 +0100 Subject: [PATCH 39/73] Fix compatibility with Firefox --- extension/bootstrap.js | 5 +- .../content/firebug/console/commandEditor.js | 79 +++++------ .../console/commands/commandLineInclude.js | 22 +-- .../debugger/actors/breakpointActor.js | 5 +- .../firebug/debugger/actors/elementActor.js | 5 +- .../firebug/debugger/actors/objectActor.js | 6 +- .../firebug/debugger/actors/threadActor.js | 6 +- .../content/firebug/debugger/commands.js | 5 +- extension/content/firebug/lib/devtools.js | 134 ++++++++++++++++-- .../firebug/remoting/debuggerClient.js | 22 +-- extension/content/firebug/server/server.js | 7 +- 11 files changed, 189 insertions(+), 107 deletions(-) diff --git a/extension/bootstrap.js b/extension/bootstrap.js index 17784cb51e..6ee6a33a3f 100644 --- a/extension/bootstrap.js +++ b/extension/bootstrap.js @@ -74,8 +74,9 @@ function startup(params, reason) Services.obs.addObserver(windowWatcher, "chrome-document-global-created", false); // GCLI commands - Cu.import("resource://firebug/gcli.js"); - FirebugGCLICommands.startup(); + // Not supported anymore + //Cu.import("resource://firebug/gcli.js"); + //FirebugGCLICommands.startup(); } function shutdown(params, reason) diff --git a/extension/content/firebug/console/commandEditor.js b/extension/content/firebug/console/commandEditor.js index 8ab0e18274..95c3bb006a 100644 --- a/extension/content/firebug/console/commandEditor.js +++ b/extension/content/firebug/console/commandEditor.js @@ -11,13 +11,14 @@ define([ "firebug/lib/options", "firebug/lib/promise", "firebug/lib/string", + "firebug/lib/devtools", "firebug/chrome/module", "firebug/chrome/menu", "firebug/console/autoCompleter", "firebug/console/commandLine", "firebug/editor/sourceEditor", ], -function(Firebug, FBTrace, Obj, Events, Dom, Locale, Css, Options, Promise, Str, Module, Menu, +function(Firebug, FBTrace, Obj, Events, Dom, Locale, Css, Options, Promise, Str, DevTools, Module, Menu, AutoCompleter, CommandLine, SourceEditor) { "use strict"; @@ -352,49 +353,32 @@ var CommandEditor = Obj.extend(Module, return; var worker = getPrettyPrintWorker(); + if (!worker) { + return; + } + var id = "firebug-" + Obj.getUniqueId(); var deferred = Promise.defer(); - var onReply = ({data}) => - { - if (data.id !== id) - return; - - worker.removeEventListener("message", onReply, false); - - if (data.error) - { - TraceError.sysout("commandEditor.prettyPrint; ERROR " + data.error, data); - - // Remove stack trace info from the error message (separated by a newline, - // see pretty-print-worker.js) - var message = Str.safeToString(data.error); - var index = message.indexOf("\n"); - message = message.substr(0, index); - - // Log only an error message into the Console panel. - Firebug.Console.logFormatted([message], context, "error", true); - - deferred.reject(data.error); - } - else - { - this.setText(data.code); - - deferred.resolve(data.code); - } - }; - - worker.addEventListener("message", onReply, false); - - worker.postMessage({ - id: id, - url: "(command-editor)", - indent: Options.get("replaceTabs"), - source: this.getText() + return worker.performTask("pretty-print", { + url: "(command-editor)", + indent: Options.get("replaceTabs"), + source: this.getText() + }).then(data => { + this.setText(data.code); + }).then(null, error => { + TraceError.sysout("commandEditor.prettyPrint; ERROR " + error, error); + + // Remove stack trace info from the error message (separated by a newline, + // see pretty-print-worker.js) + var message = Str.safeToString(error); + var index = message.indexOf("\n"); + if (index != -1) + message = message.substr(0, index); + + // Log only an error message into the Console panel. + Firebug.Console.logFormatted([message], context, "error", true); }); - - return deferred.promise; } }); @@ -522,14 +506,15 @@ function getPrettyPrintWorker() { if (!prettyPrintWorker) { - prettyPrintWorker = new ChromeWorker( - "resource://gre/modules/devtools/server/actors/pretty-print-worker.js"); + if (!DevTools.DevToolsWorker) + return null; - prettyPrintWorker.addEventListener("error", ({message, fileName, lineNo}) => - { - TraceError.sysout("commandEditor.getPrettyPrintWorker; ERROR " + message + - " " + fileName + ":" + lineNo); - }, false); + prettyPrintWorker = new DevTools.DevToolsWorker( + DevTools.prettyPrintWorkerUrl, { + name: "pretty-print", + verbose: DevTools.DevToolsUtils.dumpn.wantLogging + } + ); } return prettyPrintWorker; diff --git a/extension/content/firebug/console/commands/commandLineInclude.js b/extension/content/firebug/console/commands/commandLineInclude.js index fe54fb1a01..3f3683e454 100644 --- a/extension/content/firebug/console/commands/commandLineInclude.js +++ b/extension/content/firebug/console/commands/commandLineInclude.js @@ -15,13 +15,14 @@ define([ "firebug/lib/system", "firebug/lib/xpcom", "firebug/lib/object", + "firebug/lib/devtools", "firebug/chrome/tableRep", "firebug/console/console", "firebug/editor/editor", "firebug/editor/inlineEditor", ], function(Module, Rep, FirebugReps, Domplate, Locale, Dom, Win, Css, Str, Options, Menu, System, - Xpcom, Obj, TableRep, Console, Editor, InlineEditor) { + Xpcom, Obj, DevTools, TableRep, Console, Editor, InlineEditor) { // ********************************************************************************************* // // Constants @@ -37,22 +38,7 @@ var Trace = FBTrace.to("DBG_COMMANDLINE"); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -var ScratchpadManager; - -try -{ - // Module paths have changed, see also: https://bugzilla.mozilla.org/show_bug.cgi?id=912121 - var scope = System.importModule([ - "resource:///modules/devtools/client/scratchpad/scratchpad-manager.jsm", - "resource:///modules/devtools/scratchpad-manager.jsm" - ]); - ScratchpadManager = scope.ScratchpadManager; -} -catch(ex) -{ - // Scratchpad does not exists (when using Seamonkey ...) -} - +var ScratchpadManager = DevTools.ScratchpadManager; var storageScope = {}, StorageService; Cu.import("resource://firebug/storageService.js", storageScope); StorageService = storageScope.StorageService; @@ -307,7 +293,7 @@ var CommandLineIncludeRep = domplate(TableRep, } ]; - if (ScratchpadManager) + if (typeof ScratchpadManager.openScratchpad == "function") { items.push({ label: "commandline.label.OpenInScratchpad", diff --git a/extension/content/firebug/debugger/actors/breakpointActor.js b/extension/content/firebug/debugger/actors/breakpointActor.js index 07af36dc5f..fb850842cd 100644 --- a/extension/content/firebug/debugger/actors/breakpointActor.js +++ b/extension/content/firebug/debugger/actors/breakpointActor.js @@ -3,10 +3,11 @@ define([ "firebug/lib/object", "firebug/lib/trace", + "firebug/lib/devtools", "firebug/debugger/debuggerLib", "firebug/debugger/breakpoints/breakpointStore", ], -function(Obj, FBTrace, DebuggerLib, BreakpointStore) { +function(Obj, FBTrace, DevTools, DebuggerLib, BreakpointStore) { "use strict"; @@ -21,7 +22,7 @@ function(Obj, FBTrace, DebuggerLib, BreakpointStore) { var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); +var DebuggerServer = DevTools.DebuggerServer; // xxxHonza: Firefox 32 changes the location of BreakpointActor object, // but implements support for server side breakpoint condition evaluation diff --git a/extension/content/firebug/debugger/actors/elementActor.js b/extension/content/firebug/debugger/actors/elementActor.js index 4a97780a79..6e929f87d2 100644 --- a/extension/content/firebug/debugger/actors/elementActor.js +++ b/extension/content/firebug/debugger/actors/elementActor.js @@ -3,8 +3,9 @@ define([ "firebug/lib/object", "firebug/lib/trace", + "firebug/lib/devtools", ], -function(Obj, FBTrace) { +function(Obj, FBTrace, DevTools) { // ********************************************************************************************* // // Constants @@ -13,7 +14,7 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); +var DebuggerServer = DevTools.DebuggerServer; // ********************************************************************************************* // // Implementation diff --git a/extension/content/firebug/debugger/actors/objectActor.js b/extension/content/firebug/debugger/actors/objectActor.js index 13639cd8b4..b2f5970ec7 100644 --- a/extension/content/firebug/debugger/actors/objectActor.js +++ b/extension/content/firebug/debugger/actors/objectActor.js @@ -4,8 +4,9 @@ define([ "firebug/lib/object", "firebug/lib/trace", "firebug/lib/options", + "firebug/lib/devtools", ], -function(Obj, FBTrace, Options) { +function(Obj, FBTrace, Options, DevTools) { // ********************************************************************************************* // // Constants @@ -14,8 +15,7 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); - +var DebuggerServer = DevTools.DebuggerServer; var ObjectActor = DebuggerServer.ObjectActor; var propMax = Options.get("ObjectShortIteratorMax"); diff --git a/extension/content/firebug/debugger/actors/threadActor.js b/extension/content/firebug/debugger/actors/threadActor.js index d2593e03e3..8d42389080 100644 --- a/extension/content/firebug/debugger/actors/threadActor.js +++ b/extension/content/firebug/debugger/actors/threadActor.js @@ -4,9 +4,10 @@ define([ "firebug/lib/object", "firebug/lib/trace", "firebug/lib/options", + "firebug/lib/devtools", "firebug/debugger/actors/elementActor", ], -function(Obj, FBTrace, Options, ElementActor) { +function(Obj, FBTrace, Options, DevTools, ElementActor) { // ********************************************************************************************* // // Constants @@ -15,8 +16,7 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); - +var DebuggerServer = DevTools.DebuggerServer; var ThreadActor = DebuggerServer.ThreadActor; // ********************************************************************************************* // diff --git a/extension/content/firebug/debugger/commands.js b/extension/content/firebug/debugger/commands.js index d0b135883d..00258baa13 100644 --- a/extension/content/firebug/debugger/commands.js +++ b/extension/content/firebug/debugger/commands.js @@ -7,12 +7,13 @@ define([ "firebug/lib/trace", "firebug/lib/object", "firebug/lib/options", + "firebug/lib/devtools", "firebug/chrome/module", "firebug/debugger/rdp", "firebug/debugger/debuggerLib", "firebug/debugger/breakpoints/breakpointStore" ], -function(Firebug, FBTrace, Obj, Options, Module, RDP, DebuggerLib, BreakpointStore) { +function(Firebug, FBTrace, Obj, Options, DevTools, Module, RDP, DebuggerLib, BreakpointStore) { "use strict"; @@ -23,7 +24,7 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); +var DebuggerServer = DevTools.DebuggerServer; var Trace = FBTrace.to("DBG_DEBUGGER_COMMANDS"); var TraceError = FBTrace.toError(); diff --git a/extension/content/firebug/lib/devtools.js b/extension/content/firebug/lib/devtools.js index d4aab0f355..3c0b5aadb8 100644 --- a/extension/content/firebug/lib/devtools.js +++ b/extension/content/firebug/lib/devtools.js @@ -8,24 +8,34 @@ function() { "use strict"; var Cu = Components.utils; +var Cc = Components.classes; +var Ci = Components.interfaces; + +var appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); +var versionComparator = Cc["@mozilla.org/xpcom/version-comparator;1"].getService(Ci.nsIVersionComparator); var exports = {}; -// Support for new devtools modules path. -// See also: -// * https://wiki.mozilla.org/DevTools/Hacking -// * https://github.com/jryans/devtools-migrate/blob/master/README.md -// * https://developer.mozilla.org/en-US/docs/Tools/Contributing -// * https://bugzilla.mozilla.org/show_bug.cgi?id=912121 -try { - exports.devtools = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}).devtools; - exports.DevToolsUtils = exports.devtools["require"]("devtools/shared/DevToolsUtils"); -} catch(e) { - exports.devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools; - exports.DevToolsUtils = exports.devtools["require"]("devtools/toolkit/DevToolsUtils"); +/** + * Allows importing a JS module (Firefox platform) and specify alternative locations + * to keep backward compatibility in case when the module location changes. + * It helps Firebug to support multiple Firefox versions. + * + * @param {Array} locations List of URLs to try when importing the module. + * @returns Scope of the imported module or an empty scope if module wasn't successfully loaded. + */ +function safeImport(...args) { + for (var i=0; i Date: Thu, 28 Jan 2016 16:58:24 +0100 Subject: [PATCH 40/73] Update notification message --- .../firebug/firefox/browserOverlay.css | 11 ++ .../content/firebug/firefox/browserOverlay.js | 94 +++++++++++- .../newMultiprocessNotificationPanel.xml | 137 ++++++++++++++++++ .../multiprocess-notification.properties | 11 +- 4 files changed, 249 insertions(+), 4 deletions(-) create mode 100644 extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml diff --git a/extension/content/firebug/firefox/browserOverlay.css b/extension/content/firebug/firefox/browserOverlay.css index 89904ac131..6ddcfda9d6 100644 --- a/extension/content/firebug/firefox/browserOverlay.css +++ b/extension/content/firebug/firefox/browserOverlay.css @@ -200,6 +200,10 @@ fbMultiprocessNotificationPanel { -moz-binding: url("chrome://firebug/content/firefox/multiprocessNotificationPanel.xml#panel"); } +fbNewMultiprocessNotificationPanel { + -moz-binding: url("chrome://firebug/content/firefox/newMultiprocessNotificationPanel.xml#panel"); +} + fbAuroraNotificationPanel { -moz-binding: url("chrome://firebug/content/firefox/auroraNotificationPanel.xml#panel"); } @@ -210,12 +214,14 @@ fbUpgradeNotificationPanel { fbUpgradeNotificationPanel .iconbox, fbAuroraNotificationPanel .iconbox, +fbNewMultiprocessNotificationPanel .iconbox, fbMultiprocessNotificationPanel .iconbox { padding-right: 10px; } fbUpgradeNotificationPanel .desc, fbAuroraNotificationPanel .desc, +fbNewMultiprocessNotificationPanel .desc, fbMultiprocessNotificationPanel .desc { max-width: 300px; } @@ -225,24 +231,29 @@ fbUpgradeNotificationPanel .title { font-size: 16px; } +fbNewMultiprocessNotificationPanel .warn, fbMultiprocessNotificationPanel .warn { max-width: 275px; } +fbNewMultiprocessNotificationPanel .warn, fbMultiprocessNotificationPanel .warn { color: gray; } +fbNewMultiprocessNotificationPanel .warningbox, fbMultiprocessNotificationPanel .warningbox { margin-top: 15px; } +fbNewMultiprocessNotificationPanel .warningicon, fbMultiprocessNotificationPanel .warningicon { margin-right: 4px; } fbUpgradeNotificationPanel .progress, fbAuroraNotificationPanel .progress, +fbNewMultiprocessNotificationPanel .progress, fbMultiprocessNotificationPanel .progress { margin: 8px; } diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js index 424eaf90f5..87df700d95 100644 --- a/extension/content/firebug/firefox/browserOverlay.js +++ b/extension/content/firebug/firefox/browserOverlay.js @@ -13,9 +13,10 @@ define([ "firebug/firefox/browserMenu", "firebug/firefox/browserToolbar", "firebug/lib/system", + "firebug/lib/devtools", ], function(FBTrace, Options, Locale, Events, Arr, Str, Xpcom, BrowserOverlayLib, - BrowserCommands, BrowserMenu, BrowserToolbar, System) { + BrowserCommands, BrowserMenu, BrowserToolbar, System, DevTools) { // ********************************************************************************************* // // Constants @@ -150,13 +151,18 @@ BrowserOverlay.prototype = { // Special case for e10s enabled browser. if (this.isMultiprocessEnabled()) { + this.showNewMultiprocessNotification(); + return; + } + + /*if (this.isMultiprocessEnabled()) { this.showMultiprocessNotification(); return; } else if (this.isAuroraChannel()) { this.showAuroraNotification(); return; - } + }*/ if (this.win.Firebug.waitingForFirstLoad) return; @@ -748,6 +754,28 @@ BrowserOverlay.prototype = panel.open(); }, + showNewMultiprocessNotification: function() + { + if (Options.get("noMultiprocessMessage")) + { + this.toggleDevTools(); + return; + } + + var popupSet = $(this.doc, "mainPopupSet"); + var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); + if (!panel) + { + panel = this.doc.createElement("fbNewMultiprocessNotificationPanel"); + panel.setAttribute("opendevtoolscommand", "Firebug.browserOverlay.onOpenDevTools(event, 'fbMultiprocessNotificationPanel')"); + panel.setAttribute("disablecommand", "Firebug.browserOverlay.onDisableE10s(event)"); + popupSet.appendChild(panel); + } + + panel.internationalize(Locale); + panel.open(); + }, + onDisableE10s: function(event) { Events.cancelEvent(event); @@ -757,9 +785,37 @@ BrowserOverlay.prototype = Options.setPref("browser.tabs", "remote.autostart", false); Options.setPref("browser.tabs", "remote.autostart.1", false); + var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); + Options.set("noMultiprocessMessage", panel.notAgain.checked); + restartFirefox(); }, + onOpenDevTools: function(event) + { + Events.cancelEvent(event); + + var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); + Options.set("noMultiprocessMessage", panel.notAgain.checked); + + panel.close(); + + this.toggleDevTools(true); + }, + + toggleDevTools: function(forceOpen) { + var toolbox = getToolbox(this.win); + if (toolbox && forceOpen) { + return; + } + + if (toolbox) { + destroyToolbox(this.win); + } else { + showToolbox(this.win); + } + }, + onUpgradeFirebug: function(event, panelId) { Events.cancelEvent(event); @@ -852,6 +908,8 @@ BrowserOverlay.prototype = }, }; +// Helpers + function findFirebugUpdate(callback) { var xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); @@ -892,11 +950,41 @@ function findFirebugUpdate(callback) xhr.send(null); } -function restartFirefox() { +function restartFirefox() +{ Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup). quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit); } +function getCurrentTab(win) +{ + let browserDoc = win.top.document; + let browser = browserDoc.getElementById("content"); + return browser.selectedTab; +} + +function showToolbox(win) +{ + let tab = getCurrentTab(win); + let target = DevTools.devtools.TargetFactory.forTab(tab); + return DevTools.gDevTools.showToolbox(target); +} + +function destroyToolbox(win) +{ + let toolbox = getToolbox(win); + if (toolbox) { + return toolbox.destroy(); + } +} + +function getToolbox(win) +{ + let tab = getCurrentTab(win); + let target = DevTools.devtools.TargetFactory.forTab(tab); + return DevTools.gDevTools.getToolbox(target); +} + // ********************************************************************************************* // // Registration diff --git a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml new file mode 100644 index 0000000000..29754ffefb --- /dev/null +++ b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extension/locale/en-US/multiprocess-notification.properties b/extension/locale/en-US/multiprocess-notification.properties index d62e42b98d..ad992add87 100644 --- a/extension/locale/en-US/multiprocess-notification.properties +++ b/extension/locale/en-US/multiprocess-notification.properties @@ -2,13 +2,22 @@ # multiprocess.upgrade, multiprocess.disable, multiprocess.cancel): # Label used in a notification panel that is displayed when the user clicks on Firebug start # button in multiprocess Firefox browser (e10s enabled browser). -multiprocess.description=Firebug 2 doesn't work with multiprocess Firefox (e10s). So you need to either disable e10s or upgrade to Firebug 3 alpha. +multiprocess.description=Firebug 2 doesn't work with multiprocess Firefox (e10s). So, you need to either disable e10s or open Firefox Developer Tools. multiprocess.learnMore=Learn more... multiprocess.warning=Firebug 3 alpha is based on the built-in Firefox developer tools so Firebug 2 addons don't work just yet, however turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. multiprocess.upgrade=Upgrade and Restart multiprocess.disable=Disable e10s and Restart multiprocess.cancel=Cancel +# LOCALIZATION NOTE (multiprocess.notAgain, multiprocess.description2, +# multiprocess.openDevTools, multiprocess.warning2): Label used in a new notification panel +# that is displayed when the user clicks on Firebug start button in multiprocess +# Firefox browser (e10s enabled browser). +multiprocess.description2=We've ported many Firebug features into built-in tools in order to support existing Firebug users so, go ahead and check it out! +multiprocess.openDevTools=Open Firefox Developer Tools +multiprocess.warning2=Turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. +multiprocess.notAgain=Do not display this message again + # LOCALIZATION NOTE (aurora.description, aurora.description2, aurora.notnow, aurora.nothanks): # Label used in a notification panel that is displayed when the user clicks on Firebug start # button in Aurora (Firefox) channel. From 8c5f087a199c2a451efd0bd0b4991f18eb875c65 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Thu, 4 Feb 2016 08:34:04 +0100 Subject: [PATCH 41/73] Update learn-more link in e10s popup notification --- .../firebug/firefox/newMultiprocessNotificationPanel.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml index 29754ffefb..48a9eeb9c2 100644 --- a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml +++ b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml @@ -26,7 +26,7 @@ + href="https://getfirebug.com/merging-into-firefox-developer-tools"/> From 05bf405a7759457c81256522e4085d033afa345e Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Thu, 4 Feb 2016 08:43:52 +0100 Subject: [PATCH 42/73] [firebug-2.0.14b1] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 6 +++--- extension/install.rdf.tpl.xml | 4 ++-- extension/update.rdf.tpl.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 5f76de746d..39b0b6532b 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.13 +RELEASE=.14b1 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 9da029c0bc..6b48a63883 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.13 + 2.0.14b1 2 true @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 45.0 + 46.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 45.0 + 46.0 diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index 5db43982d2..1781d2f5ed 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 42.0 + 46.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 42.0 + 46.0 diff --git a/extension/update.rdf.tpl.xml b/extension/update.rdf.tpl.xml index 9e344c621b..2bd03abb75 100644 --- a/extension/update.rdf.tpl.xml +++ b/extension/update.rdf.tpl.xml @@ -12,7 +12,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 45.0 + 46.0 https://getfirebug.com/releases/firebug/@VERSION@/@LEAF@ https://getfirebug.com/updateInfo/firebug2.0.xml From b16a810c666a41a20da9cf511096f93d388bf4f3 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Thu, 4 Feb 2016 08:45:54 +0100 Subject: [PATCH 43/73] [firebug-2.0.14] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 39b0b6532b..89a824ceac 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.14b1 +RELEASE=.14 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 6b48a63883..3f8c3400a1 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.14b1 + 2.0.14 2 true From 3bcc4d9b19e8ea0e23085cab7b9fbb3f2d29dcc6 Mon Sep 17 00:00:00 2001 From: Florent FAYOLLE Date: Sat, 19 Mar 2016 11:25:07 +0100 Subject: [PATCH 44/73] #8000 Firebug doesn't work on nightly 48 (deprecated APIs) --- .../content/firebug/firefox/browserOverlay.js | 12 +++++++++++- extension/content/firebug/lib/http.js | 15 +++++++++++++-- extension/content/firebug/net/sourceCache.js | 1 + extension/content/firebug/net/tabCache.js | 1 + extension/modules/firebug-trace-service.js | 3 +-- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js index 87df700d95..39ad5cbf96 100644 --- a/extension/content/firebug/firefox/browserOverlay.js +++ b/extension/content/firebug/firefox/browserOverlay.js @@ -447,7 +447,17 @@ BrowserOverlay.prototype = var versionURL = "chrome://firebug/content/branch.properties"; var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); - var channel = ioService.newChannel(versionURL, null, null); + var loadingPrincipal = servicesScope.Services.scriptSecurityManager.getSystemPrincipal(); + + var channel = ioService.newChannel2( + versionURL, + /* aOriginCharset */null, + /* aBaseURI */ null, + /* aLoadingNode */null, + loadingPrincipal, + /* aTriggeringPrincipal */ null, + /* aSecurityFlag */ Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL, + /* aContentPolicyType */ Ci.nsIContentPolicy.TYPE_OTHER); var input = channel.open(); var sis = Cc["@mozilla.org/scriptableinputstream;1"]. createInstance(Ci.nsIScriptableInputStream); diff --git a/extension/content/firebug/lib/http.js b/extension/content/firebug/lib/http.js index c2be8fcdfe..b5b46fa228 100644 --- a/extension/content/firebug/lib/http.js +++ b/extension/content/firebug/lib/http.js @@ -92,11 +92,22 @@ Http.readPostTextFromPage = function(url, context) } }; -Http.getResource = function(aURL, ignoreMissing) +Http.getResource = function(aURL, ignoreMissing, doc) { + if (!doc) { + doc = Firebug.chrome.window.document; + } try { - var channel = ioService.newChannel(aURL, null, null); + var channel = ioService.newChannel2( + aURL, + /* aCharset */ null, + /* aBaseURI */ null, + /* aLoadingNode */ doc, + /* aLoadingPrincipal */ null, + /* aTriggeringPrincipal */ null, + /* aSecurityFlag */ null, + /* aContentPolicyType */ null); var input = channel.open(); return Http.readFromStream(input); diff --git a/extension/content/firebug/net/sourceCache.js b/extension/content/firebug/net/sourceCache.js index 67a1c898c2..39cb97a455 100644 --- a/extension/content/firebug/net/sourceCache.js +++ b/extension/content/firebug/net/sourceCache.js @@ -214,6 +214,7 @@ Firebug.SourceCache.prototype = Obj.extend(new EventSource(), var channel; try { + // TODO use newChannel2 here channel = ioService.newChannel(url, null, null); channel.loadFlags |= LOAD_FROM_CACHE | LOAD_BYPASS_LOCAL_CACHE_IF_BUSY; diff --git a/extension/content/firebug/net/tabCache.js b/extension/content/firebug/net/tabCache.js index f7578e68b7..da0e71921c 100644 --- a/extension/content/firebug/net/tabCache.js +++ b/extension/content/firebug/net/tabCache.js @@ -440,6 +440,7 @@ Firebug.TabCache.prototype = Obj.extend(SourceCache.prototype, if (url === "") return [Locale.$STR("message.sourceNotAvailableFor") + ": " + url]; + // TODO use newChannel2 here var channel = ioService.newChannel(url, null, null); // These flag combination doesn't repost the request. diff --git a/extension/modules/firebug-trace-service.js b/extension/modules/firebug-trace-service.js index 489c6f9b17..d34e6dbb11 100644 --- a/extension/modules/firebug-trace-service.js +++ b/extension/modules/firebug-trace-service.js @@ -138,8 +138,7 @@ TracerWrapper.prototype = // Create FBTrace proxy. As soon as FBTrace console is available it'll forward // all calls to it. - return Proxy.create( - { + return new Proxy({}, { get: function(target, name) { return self.FBTrace ? self.FBTrace[name] : self.tracer[name]; From 8d08a9fe6be130a88b783d7ccc2758d9d08d3f62 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Mon, 21 Mar 2016 16:25:21 +0100 Subject: [PATCH 45/73] Firebug doesn't work on nightly 48 (deprecated APIs) --- .../content/firebug/firefox/browserOverlay.js | 15 +++++-------- extension/content/firebug/lib/http.js | 22 ++++++++----------- extension/content/firebug/net/sourceCache.js | 11 ++++++++-- extension/content/firebug/net/tabCache.js | 9 ++++++-- extension/modules/firebug-trace-service.js | 3 ++- 5 files changed, 33 insertions(+), 27 deletions(-) diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js index 39ad5cbf96..81380e66ad 100644 --- a/extension/content/firebug/firefox/browserOverlay.js +++ b/extension/content/firebug/firefox/browserOverlay.js @@ -38,6 +38,7 @@ Locale.registerStringBundle("chrome://firebug/locale/multiprocess-notification.p Cu.import("resource://firebug/loader.js"); Cu.import("resource://firebug/fbtrace.js"); Cu.import("resource://gre/modules/AddonManager.jsm"); +Cu.import("resource://gre/modules/NetUtil.jsm"); var servicesScope = {}; Cu.import("resource://gre/modules/Services.jsm", servicesScope); @@ -449,15 +450,11 @@ BrowserOverlay.prototype = var loadingPrincipal = servicesScope.Services.scriptSecurityManager.getSystemPrincipal(); - var channel = ioService.newChannel2( - versionURL, - /* aOriginCharset */null, - /* aBaseURI */ null, - /* aLoadingNode */null, - loadingPrincipal, - /* aTriggeringPrincipal */ null, - /* aSecurityFlag */ Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL, - /* aContentPolicyType */ Ci.nsIContentPolicy.TYPE_OTHER); + var channel = NetUtil.newChannel({ + uri: versionURL, + loadUsingSystemPrincipal: true + }); + var input = channel.open(); var sis = Cc["@mozilla.org/scriptableinputstream;1"]. createInstance(Ci.nsIScriptableInputStream); diff --git a/extension/content/firebug/lib/http.js b/extension/content/firebug/lib/http.js index b5b46fa228..d165aa97f9 100644 --- a/extension/content/firebug/lib/http.js +++ b/extension/content/firebug/lib/http.js @@ -17,10 +17,13 @@ function(Xpcom, FBTrace, Deprecated, StackFrame, Str) { const Cc = Components.classes; const Ci = Components.interfaces; const Cr = Components.results; +const Cu = Components.utils; const NS_SEEK_SET = Ci.nsISeekableStream.NS_SEEK_SET; const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); +Cu.import("resource://gre/modules/NetUtil.jsm"); + var Http = {}; // ********************************************************************************************* // @@ -92,22 +95,15 @@ Http.readPostTextFromPage = function(url, context) } }; -Http.getResource = function(aURL, ignoreMissing, doc) +Http.getResource = function(aURL, ignoreMissing) { - if (!doc) { - doc = Firebug.chrome.window.document; - } try { - var channel = ioService.newChannel2( - aURL, - /* aCharset */ null, - /* aBaseURI */ null, - /* aLoadingNode */ doc, - /* aLoadingPrincipal */ null, - /* aTriggeringPrincipal */ null, - /* aSecurityFlag */ null, - /* aContentPolicyType */ null); + var channel = NetUtil.newChannel({ + uri: aURL, + loadUsingSystemPrincipal: true + }); + var input = channel.open(); return Http.readFromStream(input); diff --git a/extension/content/firebug/net/sourceCache.js b/extension/content/firebug/net/sourceCache.js index 39cb97a455..30032f33fc 100644 --- a/extension/content/firebug/net/sourceCache.js +++ b/extension/content/firebug/net/sourceCache.js @@ -17,6 +17,8 @@ function(EventSource, Obj, Firebug, Xpcom, Url, Http, Options, Str) { const Cc = Components.classes; const Ci = Components.interfaces; +const Cu = Components.utils; + const nsIIOService = Ci.nsIIOService; const nsIRequest = Ci.nsIRequest; const nsICachingChannel = Ci.nsICachingChannel; @@ -34,6 +36,8 @@ const LOAD_BYPASS_LOCAL_CACHE_IF_BUSY = nsICachingChannel.LOAD_BYPASS_LOCAL_CACH const NS_BINDING_ABORTED = 0x804b0002; +Cu.import("resource://gre/modules/NetUtil.jsm"); + // ********************************************************************************************* // Firebug.SourceCache = function(context) @@ -214,8 +218,11 @@ Firebug.SourceCache.prototype = Obj.extend(new EventSource(), var channel; try { - // TODO use newChannel2 here - channel = ioService.newChannel(url, null, null); + channel = NetUtil.newChannel({ + uri: url, + loadUsingSystemPrincipal: true + }); + channel.loadFlags |= LOAD_FROM_CACHE | LOAD_BYPASS_LOCAL_CACHE_IF_BUSY; if (method && (channel instanceof nsIHttpChannel)) diff --git a/extension/content/firebug/net/tabCache.js b/extension/content/firebug/net/tabCache.js index da0e71921c..38e59550b2 100644 --- a/extension/content/firebug/net/tabCache.js +++ b/extension/content/firebug/net/tabCache.js @@ -27,9 +27,12 @@ function(ActivableModule, Obj, Firebug, Xpcom, HttpRequestObserver, HttpResponse const Cc = Components.classes; const Ci = Components.interfaces; +const Cu = Components.utils; const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); +Cu.import("resource://gre/modules/NetUtil.jsm"); + // List of text content types. These content-types are cached. var contentTypes = { @@ -440,8 +443,10 @@ Firebug.TabCache.prototype = Obj.extend(SourceCache.prototype, if (url === "") return [Locale.$STR("message.sourceNotAvailableFor") + ": " + url]; - // TODO use newChannel2 here - var channel = ioService.newChannel(url, null, null); + var channel = NetUtil.newChannel({ + uri: url, + loadUsingSystemPrincipal: true + }); // These flag combination doesn't repost the request. channel.loadFlags = Ci.nsIRequest.LOAD_FROM_CACHE | diff --git a/extension/modules/firebug-trace-service.js b/extension/modules/firebug-trace-service.js index d34e6dbb11..40ffc082a5 100644 --- a/extension/modules/firebug-trace-service.js +++ b/extension/modules/firebug-trace-service.js @@ -138,7 +138,8 @@ TracerWrapper.prototype = // Create FBTrace proxy. As soon as FBTrace console is available it'll forward // all calls to it. - return new Proxy({}, { + return new Proxy({}, + { get: function(target, name) { return self.FBTrace ? self.FBTrace[name] : self.tracer[name]; From 610ce1cf827d644f0446122a3742ce4e0088e60f Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Mon, 21 Mar 2016 16:40:50 +0100 Subject: [PATCH 46/73] Fix compatibility with Firefox (gDevTools getter) --- extension/content/firebug/lib/devtools.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension/content/firebug/lib/devtools.js b/extension/content/firebug/lib/devtools.js index 3c0b5aadb8..85ad112e97 100644 --- a/extension/content/firebug/lib/devtools.js +++ b/extension/content/firebug/lib/devtools.js @@ -106,7 +106,8 @@ exports.DevToolsUtils = safeRequire(devtools, exports.makeInfallible = exports.DevToolsUtils.makeInfallible; -exports.gDevTools = safeImport( +exports.gDevTools = safeGet(devtools, + "devtools/client/framework/devtools", "resource:///devtools/client/framework/gDevTools.jsm", "resource:///modules/devtools/client/framework/gDevTools.jsm", "resource:///modules/devtools/gDevTools.jsm" From 3a9367d18f094e2f0a70f4e001e7066f955c8092 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Mon, 21 Mar 2016 16:58:13 +0100 Subject: [PATCH 47/73] #7998 Migration message to new Firefox devtools is way too negative --- .../newMultiprocessNotificationPanel.xml | 19 ------------------- .../multiprocess-notification.properties | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml index 48a9eeb9c2..e4f45af196 100644 --- a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml +++ b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml @@ -22,23 +22,10 @@ - - - - - - - - - - - - - @@ -75,12 +62,6 @@ var desc = document.getAnonymousElementByAttribute(this, "anonid", "desc"); desc.textContent = Locale.$STR("multiprocess.description"); - var desc2 = document.getAnonymousElementByAttribute(this, "anonid", "desc2"); - desc2.textContent = Locale.$STR("multiprocess.description2"); - - var warn = document.getAnonymousElementByAttribute(this, "anonid", "warning"); - warn.textContent = Locale.$STR("multiprocess.warning2"); - var learnMore = document.getAnonymousElementByAttribute(this, "anonid", "learnMore"); learnMore.textContent = Locale.$STR("multiprocess.learnMore"); diff --git a/extension/locale/en-US/multiprocess-notification.properties b/extension/locale/en-US/multiprocess-notification.properties index ad992add87..f055274d27 100644 --- a/extension/locale/en-US/multiprocess-notification.properties +++ b/extension/locale/en-US/multiprocess-notification.properties @@ -2,7 +2,7 @@ # multiprocess.upgrade, multiprocess.disable, multiprocess.cancel): # Label used in a notification panel that is displayed when the user clicks on Firebug start # button in multiprocess Firefox browser (e10s enabled browser). -multiprocess.description=Firebug 2 doesn't work with multiprocess Firefox (e10s). So, you need to either disable e10s or open Firefox Developer Tools. +multiprocess.description=The next Firebug version will be integrated into the built-in Firefox Developer Tools. It comes with new and great features. Existing Firebug features have been ported into the new tools. So go ahead and check it out. multiprocess.learnMore=Learn more... multiprocess.warning=Firebug 3 alpha is based on the built-in Firefox developer tools so Firebug 2 addons don't work just yet, however turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. multiprocess.upgrade=Upgrade and Restart From 4735fd8e7e05e92e428db406730fb1a10183b0b5 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Wed, 23 Mar 2016 17:52:28 +0100 Subject: [PATCH 48/73] #7998 Migration message to new Firefox devtools is way too negative --- extension/locale/en-US/multiprocess-notification.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/locale/en-US/multiprocess-notification.properties b/extension/locale/en-US/multiprocess-notification.properties index f055274d27..88bcb3fedd 100644 --- a/extension/locale/en-US/multiprocess-notification.properties +++ b/extension/locale/en-US/multiprocess-notification.properties @@ -2,7 +2,7 @@ # multiprocess.upgrade, multiprocess.disable, multiprocess.cancel): # Label used in a notification panel that is displayed when the user clicks on Firebug start # button in multiprocess Firefox browser (e10s enabled browser). -multiprocess.description=The next Firebug version will be integrated into the built-in Firefox Developer Tools. It comes with new and great features. Existing Firebug features have been ported into the new tools. So go ahead and check it out. +multiprocess.description=The next version of Firebug will be integrated directly into the Firefox Developer Tools for increased performance, stability, and feature tracking of Firefox. Integration means an updated Inspector, new Performance, Storage and Memory tools, all using the Firebug theme that you're familiar with, so it's easy to get started. multiprocess.learnMore=Learn more... multiprocess.warning=Firebug 3 alpha is based on the built-in Firefox developer tools so Firebug 2 addons don't work just yet, however turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. multiprocess.upgrade=Upgrade and Restart From 8d7137ded7ef2c9dcc3469dc351aa9924df8150e Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Wed, 23 Mar 2016 18:16:45 +0100 Subject: [PATCH 49/73] [firebug-2.0.15b1] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 6 +++--- extension/install.rdf.tpl.xml | 4 ++-- extension/update.rdf.tpl.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 89a824ceac..f15da7fe76 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.14 +RELEASE=.15b1 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 3f8c3400a1..138e8d8111 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.14 + 2.0.15b1 2 true @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 46.0 + 47.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 46.0 + 47.0 diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index 1781d2f5ed..d41540cb16 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 46.0 + 47.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 46.0 + 47.0 diff --git a/extension/update.rdf.tpl.xml b/extension/update.rdf.tpl.xml index 2bd03abb75..a1242a8a24 100644 --- a/extension/update.rdf.tpl.xml +++ b/extension/update.rdf.tpl.xml @@ -12,7 +12,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 46.0 + 47.0 https://getfirebug.com/releases/firebug/@VERSION@/@LEAF@ https://getfirebug.com/updateInfo/firebug2.0.xml From 7dfcc94e3ff7ac46666813bd827f5a262290cf0e Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Wed, 23 Mar 2016 18:17:44 +0100 Subject: [PATCH 50/73] [firebug-2.0.15] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index f15da7fe76..3a182500b3 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.15b1 +RELEASE=.15 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 138e8d8111..ccd1b37c05 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.15b1 + 2.0.15 2 true From 00ed9f15e1d752c7f90ddaf60ca856c03fb16946 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Fri, 25 Mar 2016 15:21:35 +0100 Subject: [PATCH 51/73] #8004 Firebug icon not showing in Address bar in Firefox browser --- .../content/firebug/firefox/browserOverlay.js | 11 ++--- extension/content/firebug/lib/channel.js | 46 +++++++++++++++++++ extension/content/firebug/lib/http.js | 14 ++---- extension/content/firebug/net/sourceCache.js | 16 ++----- extension/content/firebug/net/tabCache.js | 13 ++---- 5 files changed, 61 insertions(+), 39 deletions(-) create mode 100644 extension/content/firebug/lib/channel.js diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js index 81380e66ad..e4c2a5273f 100644 --- a/extension/content/firebug/firefox/browserOverlay.js +++ b/extension/content/firebug/firefox/browserOverlay.js @@ -14,9 +14,10 @@ define([ "firebug/firefox/browserToolbar", "firebug/lib/system", "firebug/lib/devtools", + "firebug/lib/channel", ], function(FBTrace, Options, Locale, Events, Arr, Str, Xpcom, BrowserOverlayLib, - BrowserCommands, BrowserMenu, BrowserToolbar, System, DevTools) { + BrowserCommands, BrowserMenu, BrowserToolbar, System, DevTools, Channel) { // ********************************************************************************************* // // Constants @@ -38,7 +39,6 @@ Locale.registerStringBundle("chrome://firebug/locale/multiprocess-notification.p Cu.import("resource://firebug/loader.js"); Cu.import("resource://firebug/fbtrace.js"); Cu.import("resource://gre/modules/AddonManager.jsm"); -Cu.import("resource://gre/modules/NetUtil.jsm"); var servicesScope = {}; Cu.import("resource://gre/modules/Services.jsm", servicesScope); @@ -446,15 +446,10 @@ BrowserOverlay.prototype = getVersion: function() { var versionURL = "chrome://firebug/content/branch.properties"; - var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); var loadingPrincipal = servicesScope.Services.scriptSecurityManager.getSystemPrincipal(); - var channel = NetUtil.newChannel({ - uri: versionURL, - loadUsingSystemPrincipal: true - }); - + var channel = Channel.new(versionURL); var input = channel.open(); var sis = Cc["@mozilla.org/scriptableinputstream;1"]. createInstance(Ci.nsIScriptableInputStream); diff --git a/extension/content/firebug/lib/channel.js b/extension/content/firebug/lib/channel.js new file mode 100644 index 0000000000..1139e42a0a --- /dev/null +++ b/extension/content/firebug/lib/channel.js @@ -0,0 +1,46 @@ +/* See license.txt for terms of usage */ + +define([ +], +function() { + +"use strict"; + +const Cc = Components.classes; +const Ci = Components.interfaces; +const Cu = Components.utils; + +var appInfo = Cc["@mozilla.org/xre/app-info;1"] + .getService(Ci.nsIXULAppInfo); +var versionComparator = Cc["@mozilla.org/xpcom/version-comparator;1"] + .getService(Ci.nsIVersionComparator); +var fx47OrEarlier = (versionComparator.compare(appInfo.version, "47a1") < 0); + +const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); + +Cu.import("resource://gre/modules/NetUtil.jsm"); + +// ********************************************************************************************* // +// Module + +var Channel = {}; + +Channel.new = function(url) +{ + if (fx47OrEarlier) + { + return ioService.newChannel(url, null, null); + } + else + { + return NetUtil.newChannel({ + uri: url, + loadUsingSystemPrincipal: true + }); + } +} + +return Channel; + +// ********************************************************************************************* // +}); diff --git a/extension/content/firebug/lib/http.js b/extension/content/firebug/lib/http.js index d165aa97f9..80bf39b86c 100644 --- a/extension/content/firebug/lib/http.js +++ b/extension/content/firebug/lib/http.js @@ -5,9 +5,10 @@ define([ "firebug/lib/trace", "firebug/lib/deprecated", "firebug/debugger/stack/stackFrame", - "firebug/lib/string" + "firebug/lib/string", + "firebug/lib/channel", ], -function(Xpcom, FBTrace, Deprecated, StackFrame, Str) { +function(Xpcom, FBTrace, Deprecated, StackFrame, Str, Channel) { "use strict"; @@ -20,9 +21,6 @@ const Cr = Components.results; const Cu = Components.utils; const NS_SEEK_SET = Ci.nsISeekableStream.NS_SEEK_SET; -const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); - -Cu.import("resource://gre/modules/NetUtil.jsm"); var Http = {}; @@ -99,11 +97,7 @@ Http.getResource = function(aURL, ignoreMissing) { try { - var channel = NetUtil.newChannel({ - uri: aURL, - loadUsingSystemPrincipal: true - }); - + var channel = Channel.new(aURL); var input = channel.open(); return Http.readFromStream(input); diff --git a/extension/content/firebug/net/sourceCache.js b/extension/content/firebug/net/sourceCache.js index 30032f33fc..4704da81e8 100644 --- a/extension/content/firebug/net/sourceCache.js +++ b/extension/content/firebug/net/sourceCache.js @@ -8,9 +8,10 @@ define([ "firebug/lib/url", "firebug/lib/http", "firebug/lib/options", - "firebug/lib/string" + "firebug/lib/string", + "firebug/lib/channel" ], -function(EventSource, Obj, Firebug, Xpcom, Url, Http, Options, Str) { +function(EventSource, Obj, Firebug, Xpcom, Url, Http, Options, Str, Channel) { // ********************************************************************************************* // // Constants @@ -19,15 +20,12 @@ const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; -const nsIIOService = Ci.nsIIOService; const nsIRequest = Ci.nsIRequest; const nsICachingChannel = Ci.nsICachingChannel; const nsIScriptableInputStream = Ci.nsIScriptableInputStream; const nsIUploadChannel = Ci.nsIUploadChannel; const nsIHttpChannel = Ci.nsIHttpChannel; -const IOService = Cc["@mozilla.org/network/io-service;1"]; -const ioService = IOService.getService(nsIIOService); const ScriptableInputStream = Cc["@mozilla.org/scriptableinputstream;1"]; const chromeReg = Xpcom.CCSV("@mozilla.org/chrome/chrome-registry;1", "nsIToolkitChromeRegistry"); @@ -36,8 +34,6 @@ const LOAD_BYPASS_LOCAL_CACHE_IF_BUSY = nsICachingChannel.LOAD_BYPASS_LOCAL_CACH const NS_BINDING_ABORTED = 0x804b0002; -Cu.import("resource://gre/modules/NetUtil.jsm"); - // ********************************************************************************************* // Firebug.SourceCache = function(context) @@ -218,11 +214,7 @@ Firebug.SourceCache.prototype = Obj.extend(new EventSource(), var channel; try { - channel = NetUtil.newChannel({ - uri: url, - loadUsingSystemPrincipal: true - }); - + channel = Channel.new(url); channel.loadFlags |= LOAD_FROM_CACHE | LOAD_BYPASS_LOCAL_CACHE_IF_BUSY; if (method && (channel instanceof nsIHttpChannel)) diff --git a/extension/content/firebug/net/tabCache.js b/extension/content/firebug/net/tabCache.js index 38e59550b2..ceac59771e 100644 --- a/extension/content/firebug/net/tabCache.js +++ b/extension/content/firebug/net/tabCache.js @@ -18,9 +18,11 @@ define([ "firebug/trace/traceListener", "firebug/net/sourceCache", "firebug/lib/options", + "firebug/lib/channel", ], function(ActivableModule, Obj, Firebug, Xpcom, HttpRequestObserver, HttpResponseObserver, Locale, - Events, Url, Http, Str, Win, JSONViewerModel, TraceModule, TraceListener, SourceCache, Options) { + Events, Url, Http, Str, Win, JSONViewerModel, TraceModule, TraceListener, SourceCache, + Options, Channel) { // ********************************************************************************************* // // Constants @@ -29,10 +31,6 @@ const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; -const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); - -Cu.import("resource://gre/modules/NetUtil.jsm"); - // List of text content types. These content-types are cached. var contentTypes = { @@ -443,10 +441,7 @@ Firebug.TabCache.prototype = Obj.extend(SourceCache.prototype, if (url === "") return [Locale.$STR("message.sourceNotAvailableFor") + ": " + url]; - var channel = NetUtil.newChannel({ - uri: url, - loadUsingSystemPrincipal: true - }); + var channel = Channel.new(url); // These flag combination doesn't repost the request. channel.loadFlags = Ci.nsIRequest.LOAD_FROM_CACHE | From d852fc8e00ab5c7c6c50f3425d87bdb41cfc2e6d Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Wed, 30 Mar 2016 13:06:27 +0200 Subject: [PATCH 52/73] [firebug-2.0.16b1] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 6 +++--- extension/install.rdf.tpl.xml | 4 ++-- extension/update.rdf.tpl.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 3a182500b3..cf9033d505 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.15 +RELEASE=.16b1 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index ccd1b37c05..7b09a9aae6 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.15 + 2.0.16b1 2 true @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 47.0 + 48.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 47.0 + 48.0 diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index d41540cb16..e705a4c7a1 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 47.0 + 48.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 47.0 + 48.0 diff --git a/extension/update.rdf.tpl.xml b/extension/update.rdf.tpl.xml index a1242a8a24..41eca6e99f 100644 --- a/extension/update.rdf.tpl.xml +++ b/extension/update.rdf.tpl.xml @@ -12,7 +12,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 47.0 + 48.0 https://getfirebug.com/releases/firebug/@VERSION@/@LEAF@ https://getfirebug.com/updateInfo/firebug2.0.xml From edf44cd659979c639dfc3433ab372c964c697105 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Wed, 30 Mar 2016 13:09:34 +0200 Subject: [PATCH 53/73] [firebug-2.0.16] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index cf9033d505..6cd1eb0616 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.16b1 +RELEASE=.16 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 7b09a9aae6..0d595c8c05 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.16b1 + 2.0.16 2 true From 9c06765ab4c3b376a3a3e006e091eae1bdbe9690 Mon Sep 17 00:00:00 2001 From: Simon Lindholm Date: Tue, 19 Apr 2016 11:19:29 +0200 Subject: [PATCH 54/73] Issue 8012: Regular Expression DoS --- extension/content/firebug/lib/url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/content/firebug/lib/url.js b/extension/content/firebug/lib/url.js index 00e7295ff6..7c29760dff 100644 --- a/extension/content/firebug/lib/url.js +++ b/extension/content/firebug/lib/url.js @@ -417,7 +417,7 @@ Url.normalizeURL = function(url) // Normalize path traversals (a/b/../c -> a/c). while (url.indexOf("/../") !== -1 && url[0] != "/") - url = url.replace(/[^\/]+\/\.\.\//g, ""); + url = url.replace(/[^\/]+\/+\.\.\//g, ""); // Issue 1496, avoid # url = url.replace(/#.*/, ""); From c06baa0e18d6fd357fa9b67ed313e7e71563a115 Mon Sep 17 00:00:00 2001 From: SebastianZ Date: Mon, 2 May 2016 07:50:20 +0200 Subject: [PATCH 55/73] Issue #8018: CSS properties are all grouped under 'Other' in Computed side panel --- extension/content/firebug/css/computedPanel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/content/firebug/css/computedPanel.js b/extension/content/firebug/css/computedPanel.js index 8e984b9ec9..5568976bd7 100644 --- a/extension/content/firebug/css/computedPanel.js +++ b/extension/content/firebug/css/computedPanel.js @@ -44,6 +44,7 @@ try // Firefox 24 // waiting for: https://bugzilla.mozilla.org/show_bug.cgi?id=867595 var {CssLogic} = DevTools.safeRequire(DevTools.devtools, + "devtools/shared/inspector/css-logic", "devtools/shared/styleinspector/css-logic", "devtools/styleinspector/css-logic"); } From 2c2c4c684ea6bfcc9e251606b846d97ca6063b6a Mon Sep 17 00:00:00 2001 From: SebastianZ Date: Mon, 2 May 2016 08:09:18 +0200 Subject: [PATCH 56/73] Fixed a few places in code that caused warnings --- extension/content/firebug/debugger/script/breakNotification.js | 3 +++ extension/content/firebug/firefox/external-editors/editors.js | 2 +- extension/content/firebug/net/netProgress.js | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/extension/content/firebug/debugger/script/breakNotification.js b/extension/content/firebug/debugger/script/breakNotification.js index 09ebced48e..c4fb0219fd 100644 --- a/extension/content/firebug/debugger/script/breakNotification.js +++ b/extension/content/firebug/debugger/script/breakNotification.js @@ -305,6 +305,8 @@ BreakNotification.prototype = domplate(Rep, this.listener.onNotificationShow(this); return; + // xxxSebastian: Code is unreachable, therefore commented out + /* // Animation var self = this; var delta = Math.max(3, Math.floor(this.box.clientHeight/5)); @@ -326,6 +328,7 @@ BreakNotification.prototype = domplate(Rep, }, 15); return this.box; + */ }, hide: function() diff --git a/extension/content/firebug/firefox/external-editors/editors.js b/extension/content/firebug/firefox/external-editors/editors.js index 80c3b992d8..7860ade017 100644 --- a/extension/content/firebug/firefox/external-editors/editors.js +++ b/extension/content/firebug/firefox/external-editors/editors.js @@ -211,7 +211,7 @@ EditorManager.prototype = try { - var editors = this._data.map(function(x) x.id); + var editors = this._data.map(x => x.id); prefs.setCharPref(this._prefName, editors.join(",")); } catch (exc) diff --git a/extension/content/firebug/net/netProgress.js b/extension/content/firebug/net/netProgress.js index 0f7950183e..189b3a539f 100644 --- a/extension/content/firebug/net/netProgress.js +++ b/extension/content/firebug/net/netProgress.js @@ -956,6 +956,7 @@ NetProgress.prototype = function logTime(file, title, time) { // xxxHonza: just for debugging purposes. + /* return; if (!file._timings) @@ -969,6 +970,7 @@ function logTime(file, title, time) index: ++file._timings.counter, time: time }); + */ } // ********************************************************************************************* // From a8fb36863a4b341d0153202199ca9f3edecd8098 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Mon, 9 May 2016 13:34:28 +0200 Subject: [PATCH 57/73] #8003 NS_ERROR_IN_PROGRESS error in netCacheReader.js --- extension/content/firebug/net/netCacheReader.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/net/netCacheReader.js b/extension/content/firebug/net/netCacheReader.js index b87be2a985..f0549ec07e 100644 --- a/extension/content/firebug/net/netCacheReader.js +++ b/extension/content/firebug/net/netCacheReader.js @@ -279,8 +279,16 @@ function onDescriptorAvailable(netProgress, file, descriptor) { Trace.sysout("netCacheReader.onDescriptorAvailable; file.href: " + file.href, descriptor); + // Avoid error message in the Console panel. + // See also: https://github.com/firebug/firebug/issues/8003 + let descriptorDataSize = 0; + try { + descriptorDataSize = descriptor.dataSize; + } catch (err) { + } + if (file.size <= 0) - file.size = descriptor.dataSize; + file.size = descriptorDataSize; if (descriptor.lastModified && descriptor.lastFetched && descriptor.lastModified < Math.floor(file.startTime/1000)) @@ -304,7 +312,7 @@ function onDescriptorAvailable(netProgress, file, descriptor) }, { name: "Data Size", - value: descriptor.dataSize + value: descriptorDataSize }, { name: "Fetch Count", From 534d8cdc620bceca868845418bbf6dd1457a79f2 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 10 May 2016 12:53:23 +0200 Subject: [PATCH 58/73] #8022 Improve multiprocess notification popup --- .../firebug/firefox/browserOverlay.css | 16 +++++++ .../content/firebug/firefox/browserOverlay.js | 46 +++++++++++++++++-- .../newMultiprocessNotificationPanel.xml | 46 +++++++++++++++---- extension/defaults/preferences/firebug.js | 4 ++ .../multiprocess-notification.properties | 16 +++++-- 5 files changed, 112 insertions(+), 16 deletions(-) diff --git a/extension/content/firebug/firefox/browserOverlay.css b/extension/content/firebug/firefox/browserOverlay.css index 6ddcfda9d6..ed67e15991 100644 --- a/extension/content/firebug/firefox/browserOverlay.css +++ b/extension/content/firebug/firefox/browserOverlay.css @@ -219,6 +219,22 @@ fbMultiprocessNotificationPanel .iconbox { padding-right: 10px; } +fbNewMultiprocessNotificationPanel .closeButton { + background-image: url(chrome://firebug/skin/mac/close.svg); + width: 13px; + height: 13px; + border: none; + cursor: pointer; +} + +fbNewMultiprocessNotificationPanel .closeButton:hover { + filter: url(resource://firebugui/filters.svg#darken); +} + +fbNewMultiprocessNotificationPanel .closeButton:active { + filter: url(resource://firebugui/filters.svg#deepDarken); +} + fbUpgradeNotificationPanel .desc, fbAuroraNotificationPanel .desc, fbNewMultiprocessNotificationPanel .desc, diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js index e4c2a5273f..0eb1d627d4 100644 --- a/extension/content/firebug/firefox/browserOverlay.js +++ b/extension/content/firebug/firefox/browserOverlay.js @@ -764,6 +764,9 @@ BrowserOverlay.prototype = return; } + this.oldTheme = Options.getPref("devtools", "theme"); + this.oldTheme = (this.oldTheme == "firebug") ? "light" : this.oldTheme; + var popupSet = $(this.doc, "mainPopupSet"); var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); if (!panel) @@ -771,11 +774,25 @@ BrowserOverlay.prototype = panel = this.doc.createElement("fbNewMultiprocessNotificationPanel"); panel.setAttribute("opendevtoolscommand", "Firebug.browserOverlay.onOpenDevTools(event, 'fbMultiprocessNotificationPanel')"); panel.setAttribute("disablecommand", "Firebug.browserOverlay.onDisableE10s(event)"); + panel.setAttribute("activatefirebugtheme", "Firebug.browserOverlay.onActivateFirebugTheme(event)"); + popupSet.appendChild(panel); } + let firebugTheme = Options.get("activateFirebugTheme"); + panel.firebugTheme.checked = firebugTheme; + + //panel.notAgain.checked = false; + + if (firebugTheme) + { + this.activateFirebugTheme("firebug"); + } + panel.internationalize(Locale); panel.open(); + + this.toggleDevTools(true); }, onDisableE10s: function(event) @@ -788,7 +805,8 @@ BrowserOverlay.prototype = Options.setPref("browser.tabs", "remote.autostart.1", false); var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); - Options.set("noMultiprocessMessage", panel.notAgain.checked); + //Options.set("noMultiprocessMessage", panel.notAgain.checked); + Options.set("noMultiprocessMessage", true); restartFirefox(); }, @@ -798,11 +816,33 @@ BrowserOverlay.prototype = Events.cancelEvent(event); var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); - Options.set("noMultiprocessMessage", panel.notAgain.checked); + //Options.set("noMultiprocessMessage", panel.notAgain.checked); + Options.set("noMultiprocessMessage", true); panel.close(); + }, + + onActivateFirebugTheme: function(event) { + var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); + var newTheme = panel.firebugTheme.checked ? "firebug" : this.oldTheme; + + Options.set("activateFirebugTheme", panel.firebugTheme.checked); + + this.activateFirebugTheme(newTheme); + }, + + activateFirebugTheme: function(newTheme) { + var oldTheme = Options.getPref("devtools", "theme"); + + Options.setPref("devtools", "theme", newTheme); + + let data = { + pref: "devtools.theme", + newValue: newTheme, + oldValue: oldTheme + }; - this.toggleDevTools(true); + DevTools.gDevTools.emit("pref-changed", data); }, toggleDevTools: function(forceOpen) { diff --git a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml index e4f45af196..b8260153e2 100644 --- a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml +++ b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml @@ -14,10 +14,12 @@ - - - - + + + + + + @@ -26,12 +28,23 @@ class="text-link popup-notification-learnmore-link learnMore" href="https://getfirebug.com/merging-into-firefox-developer-tools"/> + + + + - + + + @@ -48,7 +61,10 @@ - + + + + @@ -62,17 +78,25 @@ var desc = document.getAnonymousElementByAttribute(this, "anonid", "desc"); desc.textContent = Locale.$STR("multiprocess.description"); + var desc3 = document.getAnonymousElementByAttribute(this, "anonid", "desc3"); + desc3.textContent = Locale.$STR("multiprocess.description3"); + var learnMore = document.getAnonymousElementByAttribute(this, "anonid", "learnMore"); learnMore.textContent = Locale.$STR("multiprocess.learnMore"); - var notAgain = document.getAnonymousElementByAttribute(this, "anonid", "notAgain"); - notAgain.label = Locale.$STR("multiprocess.notAgain"); + //var notAgain = document.getAnonymousElementByAttribute(this, "anonid", "notAgain"); + //notAgain.label = Locale.$STR("multiprocess.notAgain"); var openDevToolsButton = document.getAnonymousElementByAttribute(this, "anonid", "opendevtools"); openDevToolsButton.label = Locale.$STR("multiprocess.openDevTools"); var disableMenu = document.getAnonymousElementByAttribute(this, "anonid", "disable"); disableMenu.label = Locale.$STR("multiprocess.disable"); + + this.firebugTheme.label = Locale.$STR("multiprocess.activateFirebugTheme"); + + var closeButton = document.getAnonymousElementByAttribute(this, "anonid", "closeButton"); + closeButton.addEventListener('click', this.close.bind(this), false); ]]> @@ -113,6 +137,12 @@ return document.getAnonymousElementByAttribute(this, "anonid", "notAgain"); ]]> + + + + diff --git a/extension/defaults/preferences/firebug.js b/extension/defaults/preferences/firebug.js index 7df4e05f14..a1f9b08944 100644 --- a/extension/defaults/preferences/firebug.js +++ b/extension/defaults/preferences/firebug.js @@ -28,6 +28,10 @@ pref("extensions.firebug.hideDefaultInspector", false); pref("extensions.firebug.delayLoad", true); pref("extensions.firebug.clearAnnotationsConfirmation", true); +// Multiprocess Notification +pref("extensions.firebug.noMultiprocessMessage", false); +pref("extensions.firebug.activateFirebugTheme", true); + // Remoting pref("extensions.firebug.serverHost", "localhost"); pref("extensions.firebug.serverPort", 5999); diff --git a/extension/locale/en-US/multiprocess-notification.properties b/extension/locale/en-US/multiprocess-notification.properties index 88bcb3fedd..7333bd2fe8 100644 --- a/extension/locale/en-US/multiprocess-notification.properties +++ b/extension/locale/en-US/multiprocess-notification.properties @@ -1,12 +1,13 @@ -# LOCALIZATION NOTE (multiprocess.description, multiprocess.learnMore, multiprocess.warning, +# LOCALIZATION NOTE (multiprocess.description, multiprocess.description3, multiprocess.learnMore, multiprocess.warning, # multiprocess.upgrade, multiprocess.disable, multiprocess.cancel): # Label used in a notification panel that is displayed when the user clicks on Firebug start # button in multiprocess Firefox browser (e10s enabled browser). -multiprocess.description=The next version of Firebug will be integrated directly into the Firefox Developer Tools for increased performance, stability, and feature tracking of Firefox. Integration means an updated Inspector, new Performance, Storage and Memory tools, all using the Firebug theme that you're familiar with, so it's easy to get started. -multiprocess.learnMore=Learn more... +multiprocess.description=The next version of Firebug has been integrated directly into the Firefox Developer Tools for increased performance and stability. +multiprocess.description3=This change includes an updated Inspector and new Performance, Storage, and Memory tools, all using the Firebug theme you’re familiar with. +multiprocess.learnMore=Learn more about the changes... multiprocess.warning=Firebug 3 alpha is based on the built-in Firefox developer tools so Firebug 2 addons don't work just yet, however turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. multiprocess.upgrade=Upgrade and Restart -multiprocess.disable=Disable e10s and Restart +multiprocess.disable=Restart Firefox and enable old unstable Firefox and Firebug multiprocess.cancel=Cancel # LOCALIZATION NOTE (multiprocess.notAgain, multiprocess.description2, @@ -14,7 +15,7 @@ multiprocess.cancel=Cancel # that is displayed when the user clicks on Firebug start button in multiprocess # Firefox browser (e10s enabled browser). multiprocess.description2=We've ported many Firebug features into built-in tools in order to support existing Firebug users so, go ahead and check it out! -multiprocess.openDevTools=Open Firefox Developer Tools +multiprocess.openDevTools=Use Firefox Developer Tools multiprocess.warning2=Turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. multiprocess.notAgain=Do not display this message again @@ -35,3 +36,8 @@ upgrade.tip.upgradeFirebug=Upgrade to Firebug 3 (for testers) # Label used in a notification panel that is displayed when the user wants to explicitly upgrade Firebug. upgrade.description=Firebug 3 alpha is available for testing upgrade.description2=Firebug 3 is based on the built-in Firefox developer tools so it works with the performance, stability and security advantages coming with multiprocess Firefox (also known as e10s), however Firebug 2 addons don't work with Firebug 3 yet. + +# LOCALIZATION NOTE (multiprocess.activateFirebugTheme): +# Label used in a notification panel that is displayed when the user wants to explicitly upgrade Firebug. +# The label belongs to a checkbox allowing to activate/deactivate Firebug theme for built-in DevTools +multiprocess.activateFirebugTheme=Activate the Firebug theme From 020ed02e0fbf477f2b5f170a6a4b227785c5a0d3 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Mon, 16 May 2016 17:22:17 +0200 Subject: [PATCH 59/73] Update labels in e10s migration UI --- extension/locale/en-US/multiprocess-notification.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/locale/en-US/multiprocess-notification.properties b/extension/locale/en-US/multiprocess-notification.properties index 7333bd2fe8..ec4708d232 100644 --- a/extension/locale/en-US/multiprocess-notification.properties +++ b/extension/locale/en-US/multiprocess-notification.properties @@ -7,7 +7,7 @@ multiprocess.description3=This change includes an updated Inspector and new Perf multiprocess.learnMore=Learn more about the changes... multiprocess.warning=Firebug 3 alpha is based on the built-in Firefox developer tools so Firebug 2 addons don't work just yet, however turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. multiprocess.upgrade=Upgrade and Restart -multiprocess.disable=Restart Firefox and enable old unstable Firefox and Firebug +multiprocess.disable=Enable old Firebug and disable e10s (requires restart) multiprocess.cancel=Cancel # LOCALIZATION NOTE (multiprocess.notAgain, multiprocess.description2, @@ -15,7 +15,7 @@ multiprocess.cancel=Cancel # that is displayed when the user clicks on Firebug start button in multiprocess # Firefox browser (e10s enabled browser). multiprocess.description2=We've ported many Firebug features into built-in tools in order to support existing Firebug users so, go ahead and check it out! -multiprocess.openDevTools=Use Firefox Developer Tools +multiprocess.openDevTools=Don’t show this message again multiprocess.warning2=Turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. multiprocess.notAgain=Do not display this message again From 38a171ec4fba569c0930f5000e15ad2dbbf1e8b2 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Mon, 30 May 2016 15:36:40 +0200 Subject: [PATCH 60/73] Notification popup: auto enable the DOM panel together with Firebug theme --- .../content/firebug/firefox/browserOverlay.js | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js index 0eb1d627d4..67e6617a93 100644 --- a/extension/content/firebug/firefox/browserOverlay.js +++ b/extension/content/firebug/firefox/browserOverlay.js @@ -766,6 +766,7 @@ BrowserOverlay.prototype = this.oldTheme = Options.getPref("devtools", "theme"); this.oldTheme = (this.oldTheme == "firebug") ? "light" : this.oldTheme; + this.domPanelWasEnabled = Options.getPref("devtools", "dom.enabled"); var popupSet = $(this.doc, "mainPopupSet"); var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); @@ -787,6 +788,7 @@ BrowserOverlay.prototype = if (firebugTheme) { this.activateFirebugTheme("firebug"); + this.enableDomPanel(true); } panel.internationalize(Locale); @@ -826,9 +828,14 @@ BrowserOverlay.prototype = var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel"); var newTheme = panel.firebugTheme.checked ? "firebug" : this.oldTheme; + // Remember state of the checkbox. Options.set("activateFirebugTheme", panel.firebugTheme.checked); + // Activate/deactivate Firebug theme. this.activateFirebugTheme(newTheme); + + // When Firebug theme is activated show also the DOM panel. + this.enableDomPanel(panel.firebugTheme.checked); }, activateFirebugTheme: function(newTheme) { @@ -845,6 +852,23 @@ BrowserOverlay.prototype = DevTools.gDevTools.emit("pref-changed", data); }, + enableDomPanel: function(enable) { + var enableDomPanel = enable ? true : this.domPanelWasEnabled; + var currValue = Options.getPref("devtools", "dom.enabled"); + if (currValue == enableDomPanel) { + return; + } + + Options.setPref("devtools", "dom.enabled", enableDomPanel); + + if (enableDomPanel) { + DevTools.gDevTools.emit("tool-registered", "dom"); + } else { + let toolDefinition = DevTools.gDevTools._tools.get("dom"); + DevTools.gDevTools.emit("tool-unregistered", toolDefinition); + } + }, + toggleDevTools: function(forceOpen) { var toolbox = getToolbox(this.win); if (toolbox && forceOpen) { From 70c6f990c6a398a07dcd38d741b212dcc72fff48 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 7 Jun 2016 11:32:55 +0200 Subject: [PATCH 61/73] Update link in migration popup --- .../firebug/firefox/newMultiprocessNotificationPanel.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml index b8260153e2..53b04db771 100644 --- a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml +++ b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml @@ -26,7 +26,7 @@ + href="https://getfirebug.com/unifying-firebug-and-firefox-devtools"/> From b55ced162b9b98fffd351de387f475f5c6423ad4 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 7 Jun 2016 12:28:34 +0200 Subject: [PATCH 62/73] [firebug-2.0.17b1] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 6 +++--- extension/install.rdf.tpl.xml | 4 ++-- extension/update.rdf.tpl.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 6cd1eb0616..0a1d244b6d 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.16 +RELEASE=.17b1 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 0d595c8c05..a98fe945dc 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.16 + 2.0.17b1 2 true @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 48.0 + 49.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 48.0 + 49.0 diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index e705a4c7a1..fbb413f5cd 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -14,7 +14,7 @@ toolkit@mozilla.org 30.0a1 - 48.0 + 49.0 @@ -23,7 +23,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 48.0 + 49.0 diff --git a/extension/update.rdf.tpl.xml b/extension/update.rdf.tpl.xml index 41eca6e99f..2186575f6d 100644 --- a/extension/update.rdf.tpl.xml +++ b/extension/update.rdf.tpl.xml @@ -12,7 +12,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 48.0 + 49.0 https://getfirebug.com/releases/firebug/@VERSION@/@LEAF@ https://getfirebug.com/updateInfo/firebug2.0.xml From 65f8ddb4e1170c3496d54a5cec9a4e50d51ea639 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 7 Jun 2016 12:30:53 +0200 Subject: [PATCH 63/73] [firebug-2.0.17] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 0a1d244b6d..0176746715 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.17b1 +RELEASE=.17 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index a98fe945dc..4372bd4f0a 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.17b1 + 2.0.17 2 true From 313e5bece064c0fb0ab7db123a38ba3b90dfc922 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 21 Jun 2016 10:13:05 +0200 Subject: [PATCH 64/73] #8030 Mark as e10s compatible --- extension/install.rdf | 1 + extension/install.rdf.tpl.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/extension/install.rdf b/extension/install.rdf index 4372bd4f0a..fac24fe716 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -8,6 +8,7 @@ 2.0.17 2 true + true diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index fbb413f5cd..94c27feca9 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -8,6 +8,7 @@ @VERSION@@RELEASE@ 2 true + true From e35631a6f9213732151eaae03b8f54ae29720986 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Fri, 7 Oct 2016 13:57:27 +0200 Subject: [PATCH 65/73] [firebug-2.0.18b1] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 6 +++--- extension/install.rdf.tpl.xml | 4 ++-- extension/update.rdf.tpl.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 0176746715..f4495b2b39 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.17 +RELEASE=.18b1 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index fac24fe716..60127e151b 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.17 + 2.0.18b1 2 true true @@ -15,7 +15,7 @@ toolkit@mozilla.org 30.0a1 - 49.0 + 52.0 @@ -24,7 +24,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 49.0 + 52.0 diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index 94c27feca9..40def2a61a 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -15,7 +15,7 @@ toolkit@mozilla.org 30.0a1 - 49.0 + 52.0 @@ -24,7 +24,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 49.0 + 52.0 diff --git a/extension/update.rdf.tpl.xml b/extension/update.rdf.tpl.xml index 2186575f6d..9a4cb91709 100644 --- a/extension/update.rdf.tpl.xml +++ b/extension/update.rdf.tpl.xml @@ -12,7 +12,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 49.0 + 52.0 https://getfirebug.com/releases/firebug/@VERSION@/@LEAF@ https://getfirebug.com/updateInfo/firebug2.0.xml From d5d4953eeb74ac204bea0b19ab101c549884ea19 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Fri, 7 Oct 2016 13:58:41 +0200 Subject: [PATCH 66/73] [firebug-2.0.18] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index f4495b2b39..41bd5f369c 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.18b1 +RELEASE=.18 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 60127e151b..6af7ebb4cd 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.18b1 + 2.0.18 2 true true From 2484ffd6391db4730d2dcb8010870f9d6a2a339b Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Mon, 21 Nov 2016 12:10:00 +0100 Subject: [PATCH 67/73] Update readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 7baa1bb6df..014683cc0e 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ Firebug ======= *Web Development Evolved* [getfirebug.com](https://getfirebug.com) +**The Firebug extension isn't being developed or maintained +[any longer](https://blog.getfirebug.com/2016/02/08/merging-firebug-into-the-built-in-firefox-developer-tools/). +We invite you to use the +[Firefox built-in DevTools](https://developer.mozilla.org/en-US/docs/Tools) instead.** + [Download](https://addons.mozilla.org/en-US/firefox/addon/firebug/) License From 8c0f43d827a3b7e732a253757390af1ceb68d2b4 Mon Sep 17 00:00:00 2001 From: Sebastian Zartner Date: Tue, 14 Feb 2017 11:32:25 +0100 Subject: [PATCH 68/73] Issue #8077: Hide 'Inspect Element with Firebug' menu item when e10s is enabled --- .../content/firebug/firefox/browserMenu.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/extension/content/firebug/firefox/browserMenu.js b/extension/content/firebug/firefox/browserMenu.js index 23b597dced..54c79fcd8c 100644 --- a/extension/content/firebug/firefox/browserMenu.js +++ b/extension/content/firebug/firefox/browserMenu.js @@ -436,15 +436,17 @@ var BrowserMenu = overlayFirefoxMenu: function(doc) { // Firefox page context menu + if (!this.browserOverlay.isMultiprocessEnabled() && !this.browserOverlay.auroraChannel) { $menupopupOverlay(doc, $(doc, "contentAreaContextMenu"), [ - $menuseparator(doc), - $menuitem(doc, { - id: "menu_firebug_firebugInspect", - label: "firebug.InspectElementWithFirebug", - command: "cmd_firebug_inspect", - "class": "menuitem-iconic" - }) - ]); + $menuseparator(doc), + $menuitem(doc, { + id: "menu_firebug_firebugInspect", + label: "firebug.InspectElementWithFirebug", + command: "cmd_firebug_inspect", + "class": "menuitem-iconic" + }) + ]); + } // Firefox view menu $menupopupOverlay(doc, $(doc, "menu_viewPopup"), From 5ece3f550be42e9c3a1bf3131812b380e407e19a Mon Sep 17 00:00:00 2001 From: Sebastian Zartner Date: Wed, 15 Feb 2017 11:29:16 +0100 Subject: [PATCH 69/73] Issue #8077: Removed check for Aurora channel and fixed indentation --- .../content/firebug/firefox/browserMenu.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/extension/content/firebug/firefox/browserMenu.js b/extension/content/firebug/firefox/browserMenu.js index 54c79fcd8c..53b586b11c 100644 --- a/extension/content/firebug/firefox/browserMenu.js +++ b/extension/content/firebug/firefox/browserMenu.js @@ -436,17 +436,17 @@ var BrowserMenu = overlayFirefoxMenu: function(doc) { // Firefox page context menu - if (!this.browserOverlay.isMultiprocessEnabled() && !this.browserOverlay.auroraChannel) { - $menupopupOverlay(doc, $(doc, "contentAreaContextMenu"), [ - $menuseparator(doc), - $menuitem(doc, { - id: "menu_firebug_firebugInspect", - label: "firebug.InspectElementWithFirebug", - command: "cmd_firebug_inspect", - "class": "menuitem-iconic" - }) - ]); - } + if (!this.browserOverlay.isMultiprocessEnabled()) { + $menupopupOverlay(doc, $(doc, "contentAreaContextMenu"), [ + $menuseparator(doc), + $menuitem(doc, { + id: "menu_firebug_firebugInspect", + label: "firebug.InspectElementWithFirebug", + command: "cmd_firebug_inspect", + "class": "menuitem-iconic" + }) + ]); + } // Firefox view menu $menupopupOverlay(doc, $(doc, "menu_viewPopup"), From f9e999d71b7a35d251e3222da5b66b766b21714e Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Thu, 16 Feb 2017 16:36:15 +0100 Subject: [PATCH 70/73] [firebug-2.0.19b1] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 6 +++--- extension/install.rdf.tpl.xml | 4 ++-- extension/update.rdf.tpl.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 41bd5f369c..ecd4aebc93 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.18 +RELEASE=.19b1 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index 6af7ebb4cd..bd7fe6cddb 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.18 + 2.0.19b1 2 true true @@ -15,7 +15,7 @@ toolkit@mozilla.org 30.0a1 - 52.0 + 54.0 @@ -24,7 +24,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 52.0 + 54.0 diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index 40def2a61a..e0bf39e51f 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -15,7 +15,7 @@ toolkit@mozilla.org 30.0a1 - 52.0 + 54.0 @@ -24,7 +24,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 52.0 + 54.0 diff --git a/extension/update.rdf.tpl.xml b/extension/update.rdf.tpl.xml index 9a4cb91709..f8b4bf16df 100644 --- a/extension/update.rdf.tpl.xml +++ b/extension/update.rdf.tpl.xml @@ -12,7 +12,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 52.0 + 54.0 https://getfirebug.com/releases/firebug/@VERSION@/@LEAF@ https://getfirebug.com/updateInfo/firebug2.0.xml From 439c32dfeb81cc257b33ef121d5dbb58235fbdcf Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Thu, 16 Feb 2017 16:39:37 +0100 Subject: [PATCH 71/73] [firebug-2.0.19] --- extension/content/firebug/branch.properties | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index ecd4aebc93..c7381baa50 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.19b1 +RELEASE=.19 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/install.rdf b/extension/install.rdf index bd7fe6cddb..69ed7fdce7 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,7 +5,7 @@ firebug@software.joehewitt.com - 2.0.19b1 + 2.0.19 2 true true From 359d2a5d040362e4334a75875ff76ae877d3f790 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 24 Oct 2017 16:25:36 +0200 Subject: [PATCH 72/73] Update readme file --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 014683cc0e..fb853583af 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,7 @@ Firebug ======= *Web Development Evolved* [getfirebug.com](https://getfirebug.com) -**The Firebug extension isn't being developed or maintained -[any longer](https://blog.getfirebug.com/2016/02/08/merging-firebug-into-the-built-in-firefox-developer-tools/). -We invite you to use the -[Firefox built-in DevTools](https://developer.mozilla.org/en-US/docs/Tools) instead.** +**On November 14, with the launch of Firefox Quantum (AKA 57), support for old school extensions will stop in Firefox. That means Firebug will no longer work for many developers. However, the work continues in the great Firefox devtools. You can try Firefox devtools by updating your [release browser](https://www.mozilla.org/en-US/firefox/new/?utm_source=github&utm_campaign=switch) or [downloading Developer Edition](https://www.mozilla.org/en-US/firefox/developer/?utm_source=github&utm_campaign=switch).** [Download](https://addons.mozilla.org/en-US/firefox/addon/firebug/) From f8cf7e9c918dcf67c58f5affc0fb3716b0660232 Mon Sep 17 00:00:00 2001 From: Jan Odvarko Date: Tue, 24 Oct 2017 17:27:42 +0200 Subject: [PATCH 73/73] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb853583af..2029c2b9cc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Firebug ======= *Web Development Evolved* [getfirebug.com](https://getfirebug.com) -**On November 14, with the launch of Firefox Quantum (AKA 57), support for old school extensions will stop in Firefox. That means Firebug will no longer work for many developers. However, the work continues in the great Firefox devtools. You can try Firefox devtools by updating your [release browser](https://www.mozilla.org/en-US/firefox/new/?utm_source=github&utm_campaign=switch) or [downloading Developer Edition](https://www.mozilla.org/en-US/firefox/developer/?utm_source=github&utm_campaign=switch).** +**On November 14, with the launch of Firefox Quantum (AKA 57), support for old school extensions will stop in Firefox. That means Firebug will no longer work for many developers. However, the work continues in the great Firefox devtools. You can try Firefox devtools by updating your [release browser](https://www.mozilla.org/en-US/firefox/new/?utm_source=github&utm_campaign=switch) or [downloading Developer Edition](https://www.mozilla.org/en-US/firefox/developer/?utm_source=github&utm_campaign=switch). Read more [here](https://hacks.mozilla.org/2017/10/saying-goodbye-to-firebug/)** [Download](https://addons.mozilla.org/en-US/firefox/addon/firebug/)