Bug 1382580 - remove old-event-emitter from old debugger; r=nchevobbe
authoryulia <ystartsev@mozilla.com>
Thu, 03 May 2018 12:49:06 +0200
changeset 473039 2fc5c1baf4d339f6b48d2a948eb0fe61a827f3fc
parent 473038 b874f380be661a3bf1ef6acc8398d34e2a4efada
child 473040 31d43eae6c14b8ef4d10ad833f797a4d450bf795
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1382580
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1382580 - remove old-event-emitter from old debugger; r=nchevobbe MozReview-Commit-ID: G9DKt0kISg7
devtools/client/debugger/debugger-controller.js
devtools/client/debugger/panel.js
devtools/client/debugger/test/mochitest/head.js
--- a/devtools/client/debugger/debugger-controller.js
+++ b/devtools/client/debugger/debugger-controller.js
@@ -101,17 +101,17 @@ const { require } = BrowserLoader({
 });
 const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineConstant(this, "require", require);
 const { SimpleListWidget } = require("resource://devtools/client/shared/widgets/SimpleListWidget.jsm");
 const { BreadcrumbsWidget } = require("resource://devtools/client/shared/widgets/BreadcrumbsWidget.jsm");
 const { SideMenuWidget } = require("resource://devtools/client/shared/widgets/SideMenuWidget.jsm");
 const { VariablesView } = require("resource://devtools/client/shared/widgets/VariablesView.jsm");
 const { VariablesViewController, StackFrameUtils } = require("resource://devtools/client/shared/widgets/VariablesViewController.jsm");
-const EventEmitter = require("devtools/shared/old-event-emitter");
+const EventEmitter = require("devtools/shared/event-emitter");
 const { extend } = require("devtools/shared/extend");
 const { gDevTools } = require("devtools/client/framework/devtools");
 const { ViewHelpers, WidgetMethods, setNamedTimeout,
         clearNamedTimeout } = require("devtools/client/shared/widgets/view-helpers");
 
 // Use privileged promise in panel documents to prevent having them to freeze
 // during toolbox destruction. See bug 1402779.
 const Promise = require("Promise");
@@ -445,17 +445,17 @@ var DebuggerController = {
                             action.status === "done"),
       run: deferred.resolve
     });
     return deferred.promise;
   },
 
   waitForSourceShown: function (name) {
     const deferred = promise.defer();
-    window.on(EVENTS.SOURCE_SHOWN, function onShown(_, source) {
+    window.on(EVENTS.SOURCE_SHOWN, function onShown(source) {
       if (source.url.includes(name)) {
         window.off(EVENTS.SOURCE_SHOWN, onShown);
         deferred.resolve();
       }
     });
     return deferred.promise;
   },
 
--- a/devtools/client/debugger/panel.js
+++ b/devtools/client/debugger/panel.js
@@ -2,17 +2,17 @@
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 const { Cc, Ci, Cu, Cr } = require("chrome");
 const promise = require("promise");
-const EventEmitter = require("devtools/shared/old-event-emitter");
+const EventEmitter = require("devtools/shared/event-emitter");
 const DevToolsUtils = require("devtools/shared/DevToolsUtils");
 
 function DebuggerPanel(iframeWindow, toolbox) {
   this.panelWin = iframeWindow;
   this._toolbox = toolbox;
   this._destroyer = null;
 
   this._view = this.panelWin.DebuggerView;
--- a/devtools/client/debugger/test/mochitest/head.js
+++ b/devtools/client/debugger/test/mochitest/head.js
@@ -14,17 +14,17 @@ Services.scriptloader.loadSubScript("chr
 var gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log");
 Services.prefs.setBoolPref("devtools.debugger.log", false);
 
 var { BrowserToolboxProcess } = ChromeUtils.import("resource://devtools/client/framework/ToolboxProcess.jsm", {});
 var { DebuggerServer } = require("devtools/server/main");
 var { DebuggerClient } = require("devtools/shared/client/debugger-client");
 var ObjectClient = require("devtools/shared/client/object-client");
 var { AddonManager } = ChromeUtils.import("resource://gre/modules/AddonManager.jsm", {});
-var EventEmitter = require("devtools/shared/old-event-emitter");
+var EventEmitter = require("devtools/shared/event-emitter");
 var { Toolbox } = require("devtools/client/framework/toolbox");
 var { Task } = require("devtools/shared/task");
 
 const chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry);
 
 // Override promise with deprecated-sync-thenables
 promise = require("devtools/shared/deprecated-sync-thenables");
 
@@ -375,17 +375,17 @@ function waitForSourceAndCaretAndScopes(
 
 function waitForDebuggerEvents(aPanel, aEventName, aEventRepeat = 1) {
   info("Waiting for debugger event: '" + aEventName + "' to fire: " + aEventRepeat + " time(s).");
 
   let deferred = promise.defer();
   let panelWin = aPanel.panelWin;
   let count = 0;
 
-  panelWin.on(aEventName, function onEvent(aEventName, ...aArgs) {
+  panelWin.on(aEventName, function onEvent(...aArgs) {
     info("Debugger event '" + aEventName + "' fired: " + (++count) + " time(s).");
 
     if (count == aEventRepeat) {
       ok(true, "Enough '" + aEventName + "' panel events have been fired.");
       panelWin.off(aEventName, onEvent);
       deferred.resolve.apply(deferred, aArgs);
     }
   });