diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 34a3105fc308..730bb3d9687e 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "58d73404571f7619b478116dfec8faced97be13d", + "revision": "5e60cb6fc0e09cefe242a6fb0159fbd09360cc1a", "repo_path": "/integration/gaia-central" } diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 7aaf5eb965ec..294c4cfba1b0 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1084,6 +1084,9 @@ pref("devtools.debugger.ui.variables-searchbox-visible", false); // Enable the Profiler pref("devtools.profiler.enabled", true); +// The default Profiler UI settings +pref("devtools.profiler.ui.show-platform-data", false); + // Enable the Network Monitor pref("devtools.netmonitor.enabled", true); @@ -1123,6 +1126,7 @@ pref("devtools.gcli.eagerHelper", 2); // Remember the Web Console filters pref("devtools.webconsole.filter.network", true); pref("devtools.webconsole.filter.networkinfo", true); +pref("devtools.webconsole.filter.netwarn", true); pref("devtools.webconsole.filter.csserror", true); pref("devtools.webconsole.filter.cssparser", true); pref("devtools.webconsole.filter.exception", true); @@ -1138,6 +1142,7 @@ pref("devtools.webconsole.filter.secwarn", true); // Remember the Browser Console filters pref("devtools.browserconsole.filter.network", true); pref("devtools.browserconsole.filter.networkinfo", true); +pref("devtools.browserconsole.filter.netwarn", true); pref("devtools.browserconsole.filter.csserror", true); pref("devtools.browserconsole.filter.cssparser", true); pref("devtools.browserconsole.filter.exception", true); diff --git a/browser/config/tooltool-manifests/linux32/asan.manifest b/browser/config/tooltool-manifests/linux32/asan.manifest new file mode 100644 index 000000000000..8ce74c6e79cb --- /dev/null +++ b/browser/config/tooltool-manifests/linux32/asan.manifest @@ -0,0 +1,17 @@ +[ +{ +"clang_version": "r170890" +}, +{ +"filename": "setup.sh", +"algorithm": "sha512", +"digest": "2005a41fe97a5e00997063705f39d42b6a43b1cf7ba306cbc7b1513de34cdcd050fc6326efa2107f19ba0cc67914745dbf13154fa748010a93cf072481ef4aaa", +"size": 47 +}, +{ +"filename": "clang.tar.bz2", +"algorithm": "sha512", +"digest": "0bcfc19f05cc0f042befb3823c7ecce9ba411b152921aa29e97e7adc846e0258fd7da521b1620cb1e61a19d2fcac9b60e6d613c922b6c153e01b9b0766651d09", +"size": 62708281 +} +] diff --git a/browser/config/tooltool-manifests/linux64/asan.manifest b/browser/config/tooltool-manifests/linux64/asan.manifest new file mode 100644 index 000000000000..39ba55904656 --- /dev/null +++ b/browser/config/tooltool-manifests/linux64/asan.manifest @@ -0,0 +1,17 @@ +[ +{ +"clang_version": "r170890" +}, +{ +"filename": "setup.sh", +"algorithm": "sha512", +"digest": "2005a41fe97a5e00997063705f39d42b6a43b1cf7ba306cbc7b1513de34cdcd050fc6326efa2107f19ba0cc67914745dbf13154fa748010a93cf072481ef4aaa", +"size": 47 +}, +{ +"filename": "clang.tar.bz2", +"algorithm": "sha512", +"digest": "e14ccefd965372a57c540647b2b99e21a4aa82f81a8b9a9e18dac7cba4c3436181bef0dfab8c51bcb5c343f504a693fdcfbe7d609f10291b5dd65ab059979d29", +"size": 63034761 +} +] diff --git a/browser/config/tooltool-manifests/macosx64/asan.manifest b/browser/config/tooltool-manifests/macosx64/asan.manifest new file mode 100644 index 000000000000..ede87d30e76d --- /dev/null +++ b/browser/config/tooltool-manifests/macosx64/asan.manifest @@ -0,0 +1,17 @@ +[ +{ +"clang_version": "r170890" +}, +{ +"size": 47, +"digest": "2005a41fe97a5e00997063705f39d42b6a43b1cf7ba306cbc7b1513de34cdcd050fc6326efa2107f19ba0cc67914745dbf13154fa748010a93cf072481ef4aaa", +"algorithm": "sha512", +"filename": "setup.sh" +}, +{ +"size": 56126352, +"digest": "e156e2a39abd5bf272ee30748a6825f22ddd27565b097c66662a2a6f2e9892bc5b4bf30a3552dffbe867dbfc39e7ee086e0b2cd7935f6ea216c0cf936178a88f", +"algorithm": "sha512", +"filename": "clang.tar.bz2" +} +] diff --git a/browser/devtools/debugger/debugger-controller.js b/browser/devtools/debugger/debugger-controller.js index a3f86c592d26..eb9cb4df119d 100644 --- a/browser/devtools/debugger/debugger-controller.js +++ b/browser/devtools/debugger/debugger-controller.js @@ -314,7 +314,8 @@ let DebuggerController = { * away old scripts and get sources again. */ reconfigureThread: function(aUseSourceMaps) { - this.client.reconfigureThread(aUseSourceMaps, (aResponse) => { + this.client.reconfigureThread({ useSourceMaps: aUseSourceMaps }, + (aResponse) => { if (aResponse.error) { let msg = "Couldn't reconfigure thread: " + aResponse.message; Cu.reportError(msg); diff --git a/browser/devtools/debugger/test/Makefile.in b/browser/devtools/debugger/test/Makefile.in index 27f50dedc889..000929d2f015 100644 --- a/browser/devtools/debugger/test/Makefile.in +++ b/browser/devtools/debugger/test/Makefile.in @@ -98,6 +98,7 @@ MOCHITEST_BROWSER_TESTS = \ browser_dbg_bug883220_raise_on_pause.js \ browser_dbg_displayName.js \ browser_dbg_pause-exceptions.js \ + browser_dbg_pause-exceptions-reload.js \ browser_dbg_multiple-windows.js \ browser_dbg_iframes.js \ browser_dbg_bfcache.js \ @@ -144,6 +145,7 @@ MOCHITEST_BROWSER_PAGES = \ test-location-changes-bp.js \ test-location-changes-bp.html \ test-step-out.html \ + test-pause-exceptions-reload.html \ $(NULL) ifneq (Linux,$(OS_ARCH)) diff --git a/browser/devtools/debugger/test/browser_dbg_bfcache.js b/browser/devtools/debugger/test/browser_dbg_bfcache.js index 0b2b4c1ea69d..4221d74379ec 100644 --- a/browser/devtools/debugger/test/browser_dbg_bfcache.js +++ b/browser/devtools/debugger/test/browser_dbg_bfcache.js @@ -53,7 +53,7 @@ function testLocationChange() }); }); }); - content.location = STACK_URL; + gDebugger.DebuggerController.client.activeTab.navigateTo(STACK_URL); }); } diff --git a/browser/devtools/debugger/test/browser_dbg_bug740825_conditional-breakpoints-01.js b/browser/devtools/debugger/test/browser_dbg_bug740825_conditional-breakpoints-01.js index ed5e9c85cb98..256e21f22528 100644 --- a/browser/devtools/debugger/test/browser_dbg_bug740825_conditional-breakpoints-01.js +++ b/browser/devtools/debugger/test/browser_dbg_bug740825_conditional-breakpoints-01.js @@ -293,7 +293,7 @@ function test() }); finalCheck(); - gDebuggee.location.reload(); + gDebugger.DebuggerController.client.activeTab.reload(); } function finalCheck() { diff --git a/browser/devtools/debugger/test/browser_dbg_location-changes-blank.js b/browser/devtools/debugger/test/browser_dbg_location-changes-blank.js index 478a7677be1b..76978f355753 100644 --- a/browser/devtools/debugger/test/browser_dbg_location-changes-blank.js +++ b/browser/devtools/debugger/test/browser_dbg_location-changes-blank.js @@ -95,7 +95,7 @@ function testLocationChange() closeDebuggerAndFinish(); }); }); - content.location = "about:blank"; + gDebugger.DebuggerController.client.activeTab.navigateTo("about:blank"); }); } diff --git a/browser/devtools/debugger/test/browser_dbg_location-changes-bp.js b/browser/devtools/debugger/test/browser_dbg_location-changes-bp.js index 569171fd7827..338f8ab39cc4 100644 --- a/browser/devtools/debugger/test/browser_dbg_location-changes-bp.js +++ b/browser/devtools/debugger/test/browser_dbg_location-changes-bp.js @@ -103,7 +103,7 @@ function testReloadPage() clickAgain(); }); - content.location.reload(); + gDebugger.DebuggerController.client.activeTab.reload(); } function clickAgain() diff --git a/browser/devtools/debugger/test/browser_dbg_location-changes-new.js b/browser/devtools/debugger/test/browser_dbg_location-changes-new.js index e2b1d8e2cc02..594472818d68 100644 --- a/browser/devtools/debugger/test/browser_dbg_location-changes-new.js +++ b/browser/devtools/debugger/test/browser_dbg_location-changes-new.js @@ -95,7 +95,8 @@ function testLocationChange() closeDebuggerAndFinish(); }); }); - content.location = EXAMPLE_URL + "browser_dbg_iframes.html"; + let newLocation = EXAMPLE_URL + "browser_dbg_iframes.html"; + gDebugger.DebuggerController.client.activeTab.navigateTo(newLocation); }); } diff --git a/browser/devtools/debugger/test/browser_dbg_location-changes.js b/browser/devtools/debugger/test/browser_dbg_location-changes.js index 5f1122e638ad..940e4597573f 100644 --- a/browser/devtools/debugger/test/browser_dbg_location-changes.js +++ b/browser/devtools/debugger/test/browser_dbg_location-changes.js @@ -56,7 +56,7 @@ function testLocationChange() closeDebuggerAndFinish(); }); - content.location = TAB1_URL; + gDebugger.DebuggerController.client.activeTab.navigateTo(TAB1_URL); }); } diff --git a/browser/devtools/debugger/test/browser_dbg_pause-exceptions-reload.js b/browser/devtools/debugger/test/browser_dbg_pause-exceptions-reload.js new file mode 100644 index 000000000000..7fefa73efda7 --- /dev/null +++ b/browser/devtools/debugger/test/browser_dbg_pause-exceptions-reload.js @@ -0,0 +1,122 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/** + * Make sure that pausing on exceptions works after reload. + */ + +const TAB_URL = EXAMPLE_URL + "test-pause-exceptions-reload.html"; + +var gPane = null; +var gTab = null; +var gDebugger = null; +var gPrevPref = null; + +function test() +{ + gPrevPref = Services.prefs.getBoolPref( + "devtools.debugger.pause-on-exceptions"); + Services.prefs.setBoolPref( + "devtools.debugger.pause-on-exceptions", true); + + debug_tab_pane(TAB_URL, function(aTab, aDebuggee, aPane) { + gTab = aTab; + gPane = aPane; + gDebugger = gPane.panelWin; + + gDebugger.DebuggerController.StackFrames.autoScopeExpand = true; + gDebugger.DebuggerView.Variables.nonEnumVisible = false; + testWithFrame(); + }); +} + +function testWithFrame() +{ + // Pause on exceptions should be already enabled. + is(gDebugger.Prefs.pauseOnExceptions, true, + "The pause-on-exceptions pref should be true from startup."); + is(gDebugger.DebuggerView.Options._pauseOnExceptionsItem.getAttribute("checked"), "true", + "Pause on exceptions should be enabled from startup. ") + + let count = 0; + gPane.panelWin.gClient.addOneTimeListener("paused", function() { + gDebugger.addEventListener("Debugger:FetchedVariables", function testA() { + // We expect 2 Debugger:FetchedVariables events, one from the global object + // scope and the regular one. + if (++count < 2) { + is(count, 1, "A. First Debugger:FetchedVariables event received."); + return; + } + is(count, 2, "A. Second Debugger:FetchedVariables event received."); + gDebugger.removeEventListener("Debugger:FetchedVariables", testA, false); + + is(gDebugger.DebuggerController.activeThread.state, "paused", + "Should be paused now."); + + count = 0; + gPane.panelWin.gClient.addOneTimeListener("paused", function() { + gDebugger.addEventListener("Debugger:FetchedVariables", function testB() { + // We expect 2 Debugger:FetchedVariables events, one from the global object + // scope and the regular one. + if (++count < 2) { + is(count, 1, "B. First Debugger:FetchedVariables event received."); + return; + } + is(count, 2, "B. Second Debugger:FetchedVariables event received."); + gDebugger.removeEventListener("Debugger:FetchedVariables", testB, false); + Services.tm.currentThread.dispatch({ run: function() { + + var frames = gDebugger.DebuggerView.StackFrames.widget._list, + scopes = gDebugger.DebuggerView.Variables._list, + innerScope = scopes.firstChild, + innerNodes = innerScope.querySelector(".variables-view-element-details").childNodes; + + is(gDebugger.DebuggerController.activeThread.state, "paused", + "Should be paused again."); + + is(frames.querySelectorAll(".dbg-stackframe").length, 2, + "Should have two frames."); + + is(scopes.children.length, 2, "Should have 2 variable scopes."); + + is(innerNodes[0].querySelector(".name").getAttribute("value"), "", + "Should have the right property name for the exception."); + + is(innerNodes[0].querySelector(".value").getAttribute("value"), "Error", + "Should have the right property value for the exception."); + + resumeAndFinish(); + + }}, 0); + }, false); + }); + + content.window.location.reload(); + }, false); + }); + + content.window.location.reload(); +} + +function resumeAndFinish() { + // Disable pause on exceptions. + gDebugger.DebuggerView.Options._pauseOnExceptionsItem.setAttribute("checked", "false"); + gDebugger.DebuggerView.Options._togglePauseOnExceptions(); + + is(gDebugger.Prefs.pauseOnExceptions, false, + "The pause-on-exceptions pref should have been set to false."); + + gPane.panelWin.gClient.addOneTimeListener("resumed", function() { + Services.tm.currentThread.dispatch({ run: closeDebuggerAndFinish }, 0); + }); + + // Resume to let the exception reach it's catch clause. + gDebugger.DebuggerController.activeThread.resume(); +} + +registerCleanupFunction(function() { + removeTab(gTab); + gPane = null; + gTab = null; + gDebugger = null; +}); diff --git a/browser/devtools/debugger/test/browser_dbg_reload-same-script.js b/browser/devtools/debugger/test/browser_dbg_reload-same-script.js index bee00530f48c..1036b391da28 100644 --- a/browser/devtools/debugger/test/browser_dbg_reload-same-script.js +++ b/browser/devtools/debugger/test/browser_dbg_reload-same-script.js @@ -204,7 +204,7 @@ function test() function reloadPage() { - gDebuggee.location.reload(); + gDebugger.DebuggerController.client.activeTab.reload(); } registerCleanupFunction(function() { diff --git a/browser/devtools/debugger/test/browser_dbg_scripts-searching-05.js b/browser/devtools/debugger/test/browser_dbg_scripts-searching-05.js index d8c33b425d08..b4b13fbbe473 100644 --- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-05.js +++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-05.js @@ -127,7 +127,7 @@ function testLocationChange() }); }); - content.location = TAB1_URL; + gDebugger.DebuggerController.client.activeTab.navigateTo(TAB1_URL); } function clear() { diff --git a/browser/devtools/debugger/test/browser_dbg_sources-cache.js b/browser/devtools/debugger/test/browser_dbg_sources-cache.js index b8533c25fc8e..1b8e4169d3d1 100644 --- a/browser/devtools/debugger/test/browser_dbg_sources-cache.js +++ b/browser/devtools/debugger/test/browser_dbg_sources-cache.js @@ -108,7 +108,7 @@ function performReload(callback) { callback(); }); - gDebuggee.location.reload(); + gDebugger.DebuggerController.client.activeTab.reload(); } function testStateBeforeReload() { diff --git a/browser/devtools/debugger/test/test-pause-exceptions-reload.html b/browser/devtools/debugger/test/test-pause-exceptions-reload.html new file mode 100644 index 000000000000..c1be2edb6c2f --- /dev/null +++ b/browser/devtools/debugger/test/test-pause-exceptions-reload.html @@ -0,0 +1,27 @@ + + + + + Debugger Pause on Exceptions After Reload Test + + + + + + + diff --git a/browser/devtools/framework/toolbox-options.xul b/browser/devtools/framework/toolbox-options.xul index 433669161782..b3a032de9b1d 100644 --- a/browser/devtools/framework/toolbox-options.xul +++ b/browser/devtools/framework/toolbox-options.xul @@ -37,6 +37,12 @@ tooltiptext="&options.enablePersistentLogging.tooltip;" data-pref="devtools.webconsole.persistlog"/> +