diff --git a/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_eval_bindings.js b/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_eval_bindings.js index 25f44103f1fa..570f36711419 100644 --- a/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_eval_bindings.js +++ b/browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_eval_bindings.js @@ -126,7 +126,7 @@ add_task(async function test_devtools_inspectedWindow_eval_bindings() { if (jsterm.hud.NEW_CONSOLE_OUTPUT_ENABLED === true) { // Wait for the message to appear on the console. const messageNode = await new Promise(resolve => { - jsterm.hud.on("new-messages", function onThisMessage(e, messages) { + jsterm.hud.on("new-messages", function onThisMessage(messages) { for (let m of messages) { resolve(m.node); jsterm.hud.off("new-messages", onThisMessage); @@ -166,7 +166,7 @@ add_task(async function test_devtools_inspectedWindow_eval_bindings() { is(nodes.length, 3, "The object preview has the expected number of nodes"); } else { const options = await new Promise(resolve => { - jsterm.once("variablesview-open", (evt, view, options) => resolve(options)); + jsterm.once("variablesview-open", (view, options) => resolve(options)); }); const objectType = options.objectActor.type; diff --git a/devtools/client/scratchpad/test/browser_scratchpad_wrong_window_focus.js b/devtools/client/scratchpad/test/browser_scratchpad_wrong_window_focus.js index b86ba758473f..6bd7868442ec 100644 --- a/devtools/client/scratchpad/test/browser_scratchpad_wrong_window_focus.js +++ b/devtools/client/scratchpad/test/browser_scratchpad_wrong_window_focus.js @@ -49,7 +49,7 @@ function test() function testFocus(sw, hud) { let sp = sw.Scratchpad; - function onMessage(event, messages) { + function onMessage(messages) { let msg = [...messages][0]; let node = msg.node; diff --git a/devtools/client/webconsole/jsterm.js b/devtools/client/webconsole/jsterm.js index 9115c79c2624..4091a54deef5 100644 --- a/devtools/client/webconsole/jsterm.js +++ b/devtools/client/webconsole/jsterm.js @@ -16,7 +16,7 @@ const {KeyCodes} = require("devtools/client/shared/keycodes"); loader.lazyServiceGetter(this, "clipboardHelper", "@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper"); -loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/old-event-emitter"); +loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/event-emitter"); loader.lazyRequireGetter(this, "AutocompletePopup", "devtools/client/shared/autocomplete-popup"); loader.lazyRequireGetter(this, "ToolSidebar", "devtools/client/framework/sidebar", true); loader.lazyRequireGetter(this, "Messages", "devtools/client/webconsole/console-output", true); @@ -639,7 +639,7 @@ JSTerm.prototype = { window.focus(); } - this.emit("variablesview-open", view, options); + this.emit("variablesview-open", {view, options}); return view; }; diff --git a/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js b/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js index 10ee1373ad19..7a886de48671 100644 --- a/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js +++ b/devtools/client/webconsole/new-console-output/new-console-output-wrapper.js @@ -12,7 +12,7 @@ const actions = require("devtools/client/webconsole/new-console-output/actions/i const { createContextMenu } = require("devtools/client/webconsole/new-console-output/utils/context-menu"); const { configureStore } = require("devtools/client/webconsole/new-console-output/store"); -const EventEmitter = require("devtools/shared/old-event-emitter"); +const EventEmitter = require("devtools/shared/event-emitter"); const ConsoleOutput = createFactory(require("devtools/client/webconsole/new-console-output/components/ConsoleOutput")); const FilterBar = createFactory(require("devtools/client/webconsole/new-console-output/components/FilterBar")); const SideBar = createFactory(require("devtools/client/webconsole/new-console-output/components/SideBar")); @@ -241,7 +241,7 @@ NewConsoleOutputWrapper.prototype = { promise = new Promise(resolve => { let jsterm = this.jsterm; - jsterm.hud.on("new-messages", function onThisMessage(e, messages) { + jsterm.hud.on("new-messages", function onThisMessage(messages) { for (let m of messages) { if (m.timeStamp === timeStampToMatch) { resolve(m.node); diff --git a/devtools/client/webconsole/new-console-output/test/chrome/test_render_perf.html b/devtools/client/webconsole/new-console-output/test/chrome/test_render_perf.html index ac1d8e9e8a53..f6d8e30a6773 100644 --- a/devtools/client/webconsole/new-console-output/test/chrome/test_render_perf.html +++ b/devtools/client/webconsole/new-console-output/test/chrome/test_render_perf.html @@ -28,7 +28,7 @@ const NewConsoleOutputWrapper = browserRequire( "devtools/client/webconsole/new-console-output/new-console-output-wrapper"); const actions = browserRequire("devtools/client/webconsole/new-console-output/actions/index"); -const EventEmitter = browserRequire("devtools/shared/old-event-emitter"); +const EventEmitter = browserRequire("devtools/shared/event-emitter"); const testPackets = Array.from({length: NUM_MESSAGES}).map((el, id) => ({ "from": "server1.conn4.child1/consoleActor2", "type": "consoleAPICall", diff --git a/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js b/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js index 6671a8acb123..78b6411e238c 100644 --- a/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js +++ b/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js @@ -437,7 +437,7 @@ function* generateNetworkEventStubs() { let onNetworkUpdate = new Promise(resolve => { let i = 0; - ui.jsterm.hud.on("network-message-updated", function onNetworkUpdated(event, res) { + ui.jsterm.hud.on("network-message-updated", function onNetworkUpdated(res) { let updateKey = `${keys[i++]} update`; // We cannot ensure the form of the network update packet, some properties // might be in another order than in the original packet. diff --git a/devtools/client/webconsole/new-console-output/test/mochitest/browser_console_consolejsm_output.js b/devtools/client/webconsole/new-console-output/test/mochitest/browser_console_consolejsm_output.js index 815d6dee3225..4532cae7637e 100644 --- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_console_consolejsm_output.js +++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_console_consolejsm_output.js @@ -7,7 +7,7 @@ "use strict"; -function onNewMessage(aEvent, aNewMessages) { +function onNewMessage(aNewMessages) { for (let msg of aNewMessages) { // Messages that shouldn't be output contain the substring FAIL_TEST if (msg.node.textContent.includes("FAIL_TEST")) { @@ -119,7 +119,7 @@ add_task(function* () { let deferred = defer(); - let onFetch = (aEvent, aVar) => { + let onFetch = (aVar) => { // Skip the notification from console.dir variablesview-fetched. if (aVar._variablesView != hud.jsterm._variablesView) { return; diff --git a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_closure_inspection.js b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_closure_inspection.js index 7dc506554644..4de3682cab28 100644 --- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_closure_inspection.js +++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_closure_inspection.js @@ -81,7 +81,7 @@ function onExecuteGetName(results) { }); } -function onGetNameFetch(evt, view) { +function onGetNameFetch(view) { gVariablesView = view._variablesView; ok(gVariablesView, "variables view object"); diff --git a/devtools/client/webconsole/new-console-output/test/mochitest/head.js b/devtools/client/webconsole/new-console-output/test/mochitest/head.js index 362a565970eb..cb40b911a191 100644 --- a/devtools/client/webconsole/new-console-output/test/mochitest/head.js +++ b/devtools/client/webconsole/new-console-output/test/mochitest/head.js @@ -108,7 +108,7 @@ function waitForMessages({ hud, messages }) { return new Promise(resolve => { const matchedMessages = []; hud.ui.on("new-messages", - function messagesReceived(e, newMessages) { + function messagesReceived(newMessages) { for (let message of messages) { if (message.matched) { continue; diff --git a/devtools/client/webconsole/new-webconsole.js b/devtools/client/webconsole/new-webconsole.js index a20455b601bc..e96834ebb73c 100644 --- a/devtools/client/webconsole/new-webconsole.js +++ b/devtools/client/webconsole/new-webconsole.js @@ -7,7 +7,7 @@ "use strict"; const {Utils: WebConsoleUtils} = require("devtools/client/webconsole/utils"); -const EventEmitter = require("devtools/shared/old-event-emitter"); +const EventEmitter = require("devtools/shared/event-emitter"); const promise = require("promise"); const defer = require("devtools/shared/defer"); const Services = require("Services"); diff --git a/devtools/client/webconsole/panel.js b/devtools/client/webconsole/panel.js index f149ff53fb7b..05e281e959a6 100644 --- a/devtools/client/webconsole/panel.js +++ b/devtools/client/webconsole/panel.js @@ -10,7 +10,7 @@ const promise = require("promise"); const defer = require("devtools/shared/defer"); loader.lazyRequireGetter(this, "HUDService", "devtools/client/webconsole/hudservice", true); -loader.lazyGetter(this, "EventEmitter", () => require("devtools/shared/old-event-emitter")); +loader.lazyGetter(this, "EventEmitter", () => require("devtools/shared/event-emitter")); /** * A DevToolPanel that controls the Web Console. diff --git a/devtools/client/webconsole/test/browser_console_consolejsm_output.js b/devtools/client/webconsole/test/browser_console_consolejsm_output.js index 815d6dee3225..4532cae7637e 100644 --- a/devtools/client/webconsole/test/browser_console_consolejsm_output.js +++ b/devtools/client/webconsole/test/browser_console_consolejsm_output.js @@ -7,7 +7,7 @@ "use strict"; -function onNewMessage(aEvent, aNewMessages) { +function onNewMessage(aNewMessages) { for (let msg of aNewMessages) { // Messages that shouldn't be output contain the substring FAIL_TEST if (msg.node.textContent.includes("FAIL_TEST")) { @@ -119,7 +119,7 @@ add_task(function* () { let deferred = defer(); - let onFetch = (aEvent, aVar) => { + let onFetch = (aVar) => { // Skip the notification from console.dir variablesview-fetched. if (aVar._variablesView != hud.jsterm._variablesView) { return; diff --git a/devtools/client/webconsole/test/browser_console_hide_jsterm_when_devtools_chrome_enabled_false.js b/devtools/client/webconsole/test/browser_console_hide_jsterm_when_devtools_chrome_enabled_false.js index 2bf28e39de84..345ecdf96409 100644 --- a/devtools/client/webconsole/test/browser_console_hide_jsterm_when_devtools_chrome_enabled_false.js +++ b/devtools/client/webconsole/test/browser_console_hide_jsterm_when_devtools_chrome_enabled_false.js @@ -28,7 +28,7 @@ function testObjectInspectorPropertiesAreNotSet(variablesView) { } function* getVariablesView(hud) { - function openVariablesView(event, vview) { + function openVariablesView(vview) { deferred.resolve(vview._variablesView); } diff --git a/devtools/client/webconsole/test/browser_console_variables_view_dom_nodes.js b/devtools/client/webconsole/test/browser_console_variables_view_dom_nodes.js index 6ce5c1db6d6a..2e7827fe0562 100644 --- a/devtools/client/webconsole/test/browser_console_variables_view_dom_nodes.js +++ b/devtools/client/webconsole/test/browser_console_variables_view_dom_nodes.js @@ -37,7 +37,7 @@ function test() { const jsterm = hud.jsterm; let deferred = defer(); - jsterm.once("variablesview-fetched", (_, val) => deferred.resolve(val)); + jsterm.once("variablesview-fetched", (val) => deferred.resolve(val)); jsterm.execute("inspect(document.querySelectorAll('div'))"); let variableScope = yield deferred.promise; diff --git a/devtools/client/webconsole/test/browser_console_variables_view_dont_sort_non_sortable_classes_properties.js b/devtools/client/webconsole/test/browser_console_variables_view_dont_sort_non_sortable_classes_properties.js index a1e6cb54dc2a..3d98c40124aa 100644 --- a/devtools/client/webconsole/test/browser_console_variables_view_dont_sort_non_sortable_classes_properties.js +++ b/devtools/client/webconsole/test/browser_console_variables_view_dont_sort_non_sortable_classes_properties.js @@ -84,7 +84,7 @@ function test() { function* testNotSorted(aObject) { info("Testing " + aObject); let deferred = defer(); - jsterm.once("variablesview-fetched", (_, aVar) => deferred.resolve(aVar)); + jsterm.once("variablesview-fetched", (aVar) => deferred.resolve(aVar)); jsterm.execute("inspect(" + aObject + ")"); let variableScope = yield deferred.promise; @@ -110,7 +110,7 @@ function test() { function* testSorted(aObject) { info("Testing " + aObject); let deferred = defer(); - jsterm.once("variablesview-fetched", (_, aVar) => deferred.resolve(aVar)); + jsterm.once("variablesview-fetched", (aVar) => deferred.resolve(aVar)); jsterm.execute("inspect(" + aObject + ")"); let variableScope = yield deferred.promise; diff --git a/devtools/client/webconsole/test/browser_console_variables_view_highlighter.js b/devtools/client/webconsole/test/browser_console_variables_view_highlighter.js index c1b2194deada..95a7efb295d6 100644 --- a/devtools/client/webconsole/test/browser_console_variables_view_highlighter.js +++ b/devtools/client/webconsole/test/browser_console_variables_view_highlighter.js @@ -40,7 +40,7 @@ function onQSAexecuted(msg) { ); } -function onNodeListViewFetched(event, variable) { +function onNodeListViewFetched(variable) { gVariablesView = variable._variablesView; ok(gVariablesView, "variables view object"); diff --git a/devtools/client/webconsole/test/browser_console_variables_view_while_debugging.js b/devtools/client/webconsole/test/browser_console_variables_view_while_debugging.js index e83a8d626671..551e1c1e7c72 100644 --- a/devtools/client/webconsole/test/browser_console_variables_view_while_debugging.js +++ b/devtools/client/webconsole/test/browser_console_variables_view_while_debugging.js @@ -54,7 +54,7 @@ function* testVariablesView(hud) { info("Waiting for variable view to appear"); let variable = yield new Promise(resolve => { - jsterm.once("variablesview-fetched", (e, variable) => { + jsterm.once("variablesview-fetched", (variable) => { resolve(variable); }); executeSoon(() => EventUtils.synthesizeMouse(anchor, 2, 2, {}, diff --git a/devtools/client/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js b/devtools/client/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js index 556e7275d7ee..97dc391a2a89 100644 --- a/devtools/client/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js +++ b/devtools/client/webconsole/test/browser_console_variables_view_while_debugging_and_inspecting.js @@ -57,7 +57,7 @@ function* testVariablesView(hud) { info("Waiting for variable view to appear"); let variable = yield new Promise(resolve => { - jsterm.once("variablesview-fetched", (e, variable) => { + jsterm.once("variablesview-fetched", (variable) => { resolve(variable); }); executeSoon(() => EventUtils.synthesizeMouse(anchor, 2, 2, {}, diff --git a/devtools/client/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js b/devtools/client/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js index 78b288dd8386..eddd5364b45c 100644 --- a/devtools/client/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js +++ b/devtools/client/webconsole/test/browser_webconsole_bug_632275_getters_document_width.js @@ -25,7 +25,7 @@ function consoleOpened(hud) { hud.jsterm.once("variablesview-fetched", onOpen); } -function onViewOpened(hud, event, view) { +function onViewOpened(hud, view) { let doc = gBrowser.contentWindowAsCPOW.wrappedJSObject.document; findVariableViewProperties(view, [ diff --git a/devtools/client/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js b/devtools/client/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js index 5a9db1906da0..59059386d69f 100644 --- a/devtools/client/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js +++ b/devtools/client/webconsole/test/browser_webconsole_bug_632347_iterators_generators.js @@ -57,7 +57,7 @@ function consoleOpened(HUD) { }); } -function testVariablesView(aWebconsole, aEvent, aView) { +function testVariablesView(aWebconsole, aView) { findVariableViewProperties(aView, [ { name: "gen1", isGenerator: true }, { name: "gen2", isGenerator: true }, diff --git a/devtools/client/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js b/devtools/client/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js index c36b69e4f3a0..3cb631d32d79 100644 --- a/devtools/client/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js +++ b/devtools/client/webconsole/test/browser_webconsole_bug_651501_document_body_autocomplete.js @@ -85,7 +85,7 @@ function testPropertyPanel() { let jsterm = gHUD.jsterm; jsterm.clearOutput(); jsterm.execute("document", (msg) => { - jsterm.once("variablesview-fetched", (evt, view) => { + jsterm.once("variablesview-fetched", (view) => { deferred.resolve(view); }); let anchor = msg.querySelector(".message-body a"); diff --git a/devtools/client/webconsole/test/browser_webconsole_closure_inspection.js b/devtools/client/webconsole/test/browser_webconsole_closure_inspection.js index 7dc506554644..4de3682cab28 100644 --- a/devtools/client/webconsole/test/browser_webconsole_closure_inspection.js +++ b/devtools/client/webconsole/test/browser_webconsole_closure_inspection.js @@ -81,7 +81,7 @@ function onExecuteGetName(results) { }); } -function onGetNameFetch(evt, view) { +function onGetNameFetch(view) { gVariablesView = view._variablesView; ok(gVariablesView, "variables view object"); diff --git a/devtools/client/webconsole/test/browser_webconsole_split_escape_key.js b/devtools/client/webconsole/test/browser_webconsole_split_escape_key.js index 08a14069dd3c..bd258409d337 100644 --- a/devtools/client/webconsole/test/browser_webconsole_split_escape_key.js +++ b/devtools/client/webconsole/test/browser_webconsole_split_escape_key.js @@ -116,7 +116,7 @@ } function clickMessageAndShowVariablesView() { - let result = jsterm.once("variablesview-fetched", (event, vview) => { + let result = jsterm.once("variablesview-fetched", (vview) => { variablesView = vview; }); diff --git a/devtools/client/webconsole/test/head.js b/devtools/client/webconsole/test/head.js index 1321b93e123c..28401f4b9d13 100644 --- a/devtools/client/webconsole/test/head.js +++ b/devtools/client/webconsole/test/head.js @@ -1249,7 +1249,7 @@ function waitForMessages(options) { return rule.matched.size == count; } - function onMessagesAdded(event, newMessages) { + function onMessagesAdded(newMessages) { for (let msg of newMessages) { let elem = msg.node; let location = getRenderedSource(elem); @@ -1332,7 +1332,7 @@ function waitForMessages(options) { }); } - onMessagesAdded("new-messages", messages); + onMessagesAdded(messages); if (!allRulesMatched()) { listenerAdded = true; @@ -1529,7 +1529,7 @@ function checkOutputForInputs(hud, inputTests) { yield promise.resolve(null); } - function onVariablesViewOpen(entry, {resolve, reject}, event, view, options) { + function onVariablesViewOpen(entry, {resolve, reject}, {view, options}) { info("Variables view opened"); let label = entry.variablesViewLabel || entry.output; if (typeof label == "string" && options.label != label) { diff --git a/devtools/client/webconsole/webconsole.js b/devtools/client/webconsole/webconsole.js index d9f2522feb49..97ddd139df54 100644 --- a/devtools/client/webconsole/webconsole.js +++ b/devtools/client/webconsole/webconsole.js @@ -25,7 +25,7 @@ const {PrefObserver} = require("devtools/client/shared/prefs"); loader.lazyServiceGetter(this, "clipboardHelper", "@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper"); -loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/old-event-emitter"); +loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/event-emitter"); loader.lazyRequireGetter(this, "ConsoleOutput", "devtools/client/webconsole/console-output", true); loader.lazyRequireGetter(this, "Messages", "devtools/client/webconsole/console-output", true); loader.lazyRequireGetter(this, "EnvironmentClient", "devtools/shared/client/environment-client"); diff --git a/devtools/client/webconsole/webpack.config.js b/devtools/client/webconsole/webpack.config.js index 956ed399a5db..f9706d984a0d 100644 --- a/devtools/client/webconsole/webpack.config.js +++ b/devtools/client/webconsole/webpack.config.js @@ -97,6 +97,7 @@ webpackConfig.resolve = { "devtools/shared/fronts/timeline": path.join(__dirname, "../../client/shared/webpack/shims/fronts-timeline-shim"), "devtools/shared/old-event-emitter": "devtools-modules/src/utils/event-emitter", + "devtools/shared/event-emitter": "devtools-modules/src/utils/event-emitter", "devtools/shared/client/debugger-client": path.join(__dirname, "new-console-output/test/fixtures/DebuggerClient"), "devtools/shared/platform/clipboard": path.join(__dirname, "../../client/shared/webpack/shims/platform-clipboard-stub"), "devtools/shared/platform/stack": path.join(__dirname, "../../client/shared/webpack/shims/platform-stack-stub"), diff --git a/dom/security/test/cors/browser_CORS-console-warnings.js b/dom/security/test/cors/browser_CORS-console-warnings.js index b4b90e3f058c..ec844d5d30da 100644 --- a/dom/security/test/cors/browser_CORS-console-warnings.js +++ b/dom/security/test/cors/browser_CORS-console-warnings.js @@ -16,7 +16,7 @@ var webconsole = null; var messages_seen = 0; var expected_messages = 50; -function on_new_message(event, new_messages) { +function on_new_message(new_messages) { for (let message of new_messages) { let elem = message.node; let text = elem.textContent; diff --git a/testing/talos/talos/tests/devtools/addon/content/damp.js b/testing/talos/talos/tests/devtools/addon/content/damp.js index 4e8600225237..7d0beef1b67b 100644 --- a/testing/talos/talos/tests/devtools/addon/content/damp.js +++ b/testing/talos/talos/tests/devtools/addon/content/damp.js @@ -352,7 +352,7 @@ Damp.prototype = { // Resolve once the last message has been received. let allMessagesReceived = new Promise(resolve => { - function receiveMessages(e, messages) { + function receiveMessages(messages) { for (let m of messages) { if (m.node.textContent.includes("damp " + TOTAL_MESSAGES)) { webconsole.hud.ui.off("new-messages", receiveMessages); @@ -444,7 +444,7 @@ Damp.prototype = { // Resolve once the first message is received. let onMessageReceived = new Promise(resolve => { - function receiveMessages(e, messages) { + function receiveMessages(messages) { for (let m of messages) { resolve(m); }