Bug 1509451 - Remove LOGGER_NAME and LOGGER_PREFIX as global variables. r=Standard8
authorDão Gottwald <dao@mozilla.com>
Fri, 23 Nov 2018 10:22:45 +0000
changeset 504236 c5c9652c6ef3507b0fc844a7b7416e21f9faed20
parent 504235 05b2858c743e5b2a11914ee3a9d3adf5bf35847e
child 504237 bd2ec1be4ead26c0e0a7620d7f963b7934e37319
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1509451
milestone65.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 1509451 - Remove LOGGER_NAME and LOGGER_PREFIX as global variables. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D12729
browser/base/content/browser-data-submission-info-bar.js
--- a/browser/base/content/browser-data-submission-info-bar.js
+++ b/browser/base/content/browser-data-submission-info-bar.js
@@ -1,29 +1,28 @@
 /* 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/. */
 
-const LOGGER_NAME = "Toolkit.Telemetry";
-const LOGGER_PREFIX = "DataNotificationInfoBar::";
 /**
  * Represents an info bar that shows a data submission notification.
  */
 var gDataNotificationInfoBar = {
   _OBSERVERS: [
     "datareporting:notify-data-policy:request",
     "datareporting:notify-data-policy:close",
   ],
 
   _DATA_REPORTING_NOTIFICATION: "data-reporting",
 
   get _log() {
-    let Log = ChromeUtils.import("resource://gre/modules/Log.jsm", {}).Log;
+    let { Log } = ChromeUtils.import("resource://gre/modules/Log.jsm", {});
     delete this._log;
-    return this._log = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, LOGGER_PREFIX);
+    return this._log = Log.repository.getLoggerWithMessagePrefix(
+      "Toolkit.Telemetry", "DataNotificationInfoBar::");
   },
 
   init() {
     window.addEventListener("unload", () => {
       for (let o of this._OBSERVERS) {
         Services.obs.removeObserver(this, o);
       }
     });