Bug 1378151 - Remove toolbox-process-window.js preprocessing and enable eslint. r=jdescottes

MozReview-Commit-ID: 6qPg0jSsdsR

--HG--
extra : rebase_source : af62ae660071fe119c73be173741152a81b848a2
This commit is contained in:
Alexandre Poirot 2017-07-04 17:05:12 +02:00
Родитель 4565764d92
Коммит f490858f8f
3 изменённых файлов: 23 добавлений и 21 удалений

Просмотреть файл

@ -138,9 +138,6 @@ devtools/shared/tests/mochitest/*.html
devtools/shared/webconsole/test/test_*.html
# Ignore devtools pre-processed files
devtools/client/framework/toolbox-process-window.js
devtools/client/performance/system.js
devtools/client/webide/webide-prefs.js
devtools/client/preferences/**
# Ignore devtools third-party libs

Просмотреть файл

@ -31,7 +31,7 @@ var Prefs = new PrefsHelper("devtools.debugger", {
var gToolbox, gClient;
var connect = Task.async(function*() {
var connect = Task.async(function* () {
window.removeEventListener("load", connect);
// Initiate the connection
let transport = yield DebuggerClient.socketConnect({
@ -68,7 +68,7 @@ function setPrefDefaults() {
Services.prefs.setBoolPref("devtools.debugger.client-source-maps-enabled", true);
}
window.addEventListener("load", function() {
window.addEventListener("load", function () {
let cmdClose = document.getElementById("toolbox-cmd-close");
cmdClose.addEventListener("command", onCloseCommand);
setPrefDefaults();
@ -99,10 +99,10 @@ function openToolbox({ form, chrome, isTabActor }) {
// But if we are testing, then it should always open the debugger panel.
let selectedTool =
Services.prefs.getCharPref("devtools.browsertoolbox.panel",
Services.prefs.getCharPref("devtools.toolbox.selectedTool",
"jsdebugger"));
Services.prefs.getCharPref("devtools.toolbox.selectedTool",
"jsdebugger"));
let options = { customIframe: frame };
options = { customIframe: frame };
gDevTools.showToolbox(target,
selectedTool,
Toolbox.HostType.CUSTOM,
@ -115,7 +115,8 @@ function onNewToolbox(toolbox) {
gToolbox = toolbox;
bindToolboxHandlers();
raise();
let env = Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment);
let env = Components.classes["@mozilla.org/process/environment;1"]
.getService(Components.interfaces.nsIEnvironment);
let testScript = env.get("MOZ_TOOLBOX_TEST_SCRIPT");
if (testScript) {
// Only allow executing random chrome scripts when a special
@ -139,15 +140,16 @@ function bindToolboxHandlers() {
gToolbox.once("destroyed", quitApp);
window.addEventListener("unload", onUnload);
#ifdef XP_MACOSX
// Badge the dock icon to differentiate this process from the main application process.
updateBadgeText(false);
if (Services.appinfo.OS == "Darwin") {
// Badge the dock icon to differentiate this process from the main application
// process.
updateBadgeText(false);
// Once the debugger panel opens listen for thread pause / resume.
gToolbox.getPanelWhenReady("jsdebugger").then(panel => {
setupThreadListeners(panel);
});
#endif
// Once the debugger panel opens listen for thread pause / resume.
gToolbox.getPanelWhenReady("jsdebugger").then(panel => {
setupThreadListeners(panel);
});
}
}
function setupThreadListeners(panel) {
@ -165,7 +167,8 @@ function setupThreadListeners(panel) {
}
function updateBadgeText(paused) {
let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"].getService(Ci.nsIMacDockSupport);
let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
.getService(Ci.nsIMacDockSupport);
dockSupport.badgeText = paused ? "▐▐ " : " ▶";
}
@ -188,7 +191,9 @@ function onMessage(event) {
setTitle(json.data.value);
break;
}
} catch(e) { console.error(e); }
} catch (e) {
console.error(e);
}
}
window.addEventListener("message", onMessage);
@ -212,7 +217,7 @@ function quitApp() {
}
}
function getParameterByName (name) {
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
let regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
let results = regex.exec(window.location.search);

Просмотреть файл

@ -84,7 +84,7 @@ devtools.jar:
content/framework/toolbox-init.js (framework/toolbox-init.js)
content/framework/options-panel.css (framework/options-panel.css)
content/framework/toolbox-process-window.xul (framework/toolbox-process-window.xul)
* content/framework/toolbox-process-window.js (framework/toolbox-process-window.js)
content/framework/toolbox-process-window.js (framework/toolbox-process-window.js)
content/framework/dev-edition-promo/dev-edition-promo.xul (framework/dev-edition-promo/dev-edition-promo.xul)
* content/framework/dev-edition-promo/dev-edition-promo.css (framework/dev-edition-promo/dev-edition-promo.css)
content/framework/dev-edition-promo/dev-edition-logo.png (framework/dev-edition-promo/dev-edition-logo.png)