Bug 1452200 - 2. Convert existing code to use new logging functions; r=snorp
☠☠ backed out by e96685584bf7 ☠ ☠
authorJim Chen <nchen@mozilla.com>
Sun, 15 Apr 2018 00:15:27 -0400
changeset 466928 b03e9dc6ecd7751d56be0d68ac3b338dcee2cc2c
parent 466927 e4cdad2cd3d2e21fd0994ba523f743a7b7f43896
child 466929 ed07fb947b5e6c14b93c00a6596b756b37d306c0
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1452200
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 1452200 - 2. Convert existing code to use new logging functions; r=snorp Use the new "debug" and "warn" functions with template literals in existing code. MozReview-Commit-ID: 4ob6mom6pQF
mobile/android/chrome/geckoview/ErrorPageEventHandler.js
mobile/android/chrome/geckoview/GeckoViewContent.js
mobile/android/chrome/geckoview/GeckoViewContentSettings.js
mobile/android/chrome/geckoview/GeckoViewNavigationContent.js
mobile/android/chrome/geckoview/GeckoViewScrollContent.js
mobile/android/chrome/geckoview/GeckoViewSelectionActionContent.js
mobile/android/chrome/geckoview/geckoview.js
mobile/android/components/geckoview/GeckoViewExternalAppService.js
mobile/android/modules/geckoview/GeckoViewContent.jsm
mobile/android/modules/geckoview/GeckoViewContentModule.jsm
mobile/android/modules/geckoview/GeckoViewModule.jsm
mobile/android/modules/geckoview/GeckoViewNavigation.jsm
mobile/android/modules/geckoview/GeckoViewProgress.jsm
mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
mobile/android/modules/geckoview/GeckoViewScroll.jsm
mobile/android/modules/geckoview/GeckoViewSelectionAction.jsm
mobile/android/modules/geckoview/GeckoViewSettings.jsm
mobile/android/modules/geckoview/GeckoViewTab.jsm
mobile/android/modules/geckoview/GeckoViewTrackingProtection.jsm
--- a/mobile/android/chrome/geckoview/ErrorPageEventHandler.js
+++ b/mobile/android/chrome/geckoview/ErrorPageEventHandler.js
@@ -41,17 +41,17 @@ var ErrorPageEventHandler = {
               let uri = Services.io.newURI(errorDoc.location.href);
               let sslExceptions = new SSLExceptions();
 
               if (target == perm)
                 sslExceptions.addPermanentException(uri, errorDoc.defaultView);
               else
                 sslExceptions.addTemporaryException(uri, errorDoc.defaultView);
             } catch (e) {
-              dump("Failed to set cert exception: " + e + "\n");
+              warn `Failed to set cert exception: ${e}`;
             }
             errorDoc.location.reload();
           } else if (target == errorDoc.getElementById("getMeOutOfHereButton")) {
             errorDoc.location = "about:home";
           }
         }
         break;
       }
--- a/mobile/android/chrome/geckoview/GeckoViewContent.js
+++ b/mobile/android/chrome/geckoview/GeckoViewContent.js
@@ -5,27 +5,19 @@
 
 ChromeUtils.import("resource://gre/modules/GeckoViewContentModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   Services: "resource://gre/modules/Services.jsm",
 });
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewContent"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 class GeckoViewContent extends GeckoViewContentModule {
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
 
     addEventListener("DOMTitleChanged", this, false);
     addEventListener("DOMWindowFocus", this, false);
     addEventListener("DOMWindowClose", this, false);
     addEventListener("MozDOMFullscreen:Entered", this, false);
     addEventListener("MozDOMFullscreen:Exit", this, false);
     addEventListener("MozDOMFullscreen:Exited", this, false);
     addEventListener("MozDOMFullscreen:Request", this, false);
@@ -35,17 +27,17 @@ class GeckoViewContent extends GeckoView
                                            this);
     this.messageManager.addMessageListener("GeckoView:DOMFullscreenExited",
                                            this);
     this.messageManager.addMessageListener("GeckoView:ZoomToInput",
                                            this);
   }
 
   onDisable() {
-    debug("onDisable");
+    debug `onDisable`;
 
     removeEventListener("DOMTitleChanged", this);
     removeEventListener("DOMWindowFocus", this);
     removeEventListener("DOMWindowClose", this);
     removeEventListener("MozDOMFullscreen:Entered", this);
     removeEventListener("MozDOMFullscreen:Exit", this);
     removeEventListener("MozDOMFullscreen:Exited", this);
     removeEventListener("MozDOMFullscreen:Request", this);
@@ -55,17 +47,17 @@ class GeckoViewContent extends GeckoView
                                               this);
     this.messageManager.removeMessageListener("GeckoView:DOMFullscreenExited",
                                               this);
     this.messageManager.removeMessageListener("GeckoView:ZoomToInput",
                                               this);
   }
 
   receiveMessage(aMsg) {
-    debug("receiveMessage " + aMsg.name);
+    debug `receiveMessage: ${aMsg.name}`;
 
     switch (aMsg.name) {
       case "GeckoView:DOMFullscreenEntered":
         if (content) {
           content.QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIDOMWindowUtils)
                  .handleFullscreenRequests();
         }
@@ -120,17 +112,17 @@ class GeckoViewContent extends GeckoView
           }
         }, 500);
       }
       break;
     }
   }
 
   handleEvent(aEvent) {
-    debug("handleEvent " + aEvent.type);
+    debug `handleEvent: ${aEvent.type}`;
 
     switch (aEvent.type) {
       case "contextmenu":
         function nearestParentHref(node) {
           while (node && !node.href) {
             node = node.parentNode;
           }
           return node && node.href;
--- a/mobile/android/chrome/geckoview/GeckoViewContentSettings.js
+++ b/mobile/android/chrome/geckoview/GeckoViewContentSettings.js
@@ -5,35 +5,27 @@
 
 ChromeUtils.import("resource://gre/modules/GeckoViewContentModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   GeckoViewUtils: "resource://gre/modules/GeckoViewUtils.jsm",
 });
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewSettings[C]"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 // Handles GeckoView content settings including:
 // * tracking protection
 // * desktop mode
 class GeckoViewContentSettings extends GeckoViewContentModule {
   onInit() {
-    debug("onInit");
+    debug `onInit`;
     this._useDesktopMode = false;
   }
 
   onSettingsUpdate() {
-    debug("onSettingsUpdate");
+    debug `onSettingsUpdate`;
 
     this.displayMode = this.settings.displayMode;
     this.useTrackingProtection = !!this.settings.useTrackingProtection;
     this.useDesktopMode = !!this.settings.useDesktopMode;
   }
 
   get useTrackingProtection() {
     return docShell.useTrackingProtection;
--- a/mobile/android/chrome/geckoview/GeckoViewNavigationContent.js
+++ b/mobile/android/chrome/geckoview/GeckoViewNavigationContent.js
@@ -6,41 +6,35 @@
 ChromeUtils.import("resource://gre/modules/GeckoViewContentModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   ErrorPageEventHandler: "chrome://geckoview/content/ErrorPageEventHandler.js",
   LoadURIDelegate: "resource://gre/modules/LoadURIDelegate.jsm",
 });
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-  ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                     {}).AndroidLog.d.bind(null, "ViewNavigation[C]"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 // Implements nsILoadURIDelegate.
 class GeckoViewNavigationContent extends GeckoViewContentModule {
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
 
     docShell.loadURIDelegate = this;
   }
 
   onDisable() {
-    debug("onDisable");
+    debug `onDisable`;
 
     docShell.loadURIDelegate = null;
   }
 
   // nsILoadURIDelegate.
   loadURI(aUri, aWhere, aFlags, aTriggeringPrincipal) {
-    debug("loadURI " + (aUri && aUri.spec) + " " + aWhere + " " + aFlags);
+    debug `loadURI: uri=${ aUri && aUri.spec
+                  } where=${ aWhere
+                  } flags=${ aFlags }`;
 
     // TODO: Remove this when we have a sensible error API.
     if (aUri && aUri.displaySpec.startsWith("about:certerror")) {
       addEventListener("click", ErrorPageEventHandler, true);
     }
 
     return LoadURIDelegate.load(this.eventDispatcher, aUri, aWhere, aFlags,
                                 aTriggeringPrincipal);
--- a/mobile/android/chrome/geckoview/GeckoViewScrollContent.js
+++ b/mobile/android/chrome/geckoview/GeckoViewScrollContent.js
@@ -1,41 +1,32 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
 ChromeUtils.import("resource://gre/modules/GeckoViewContentModule.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewScrollContent"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
 
 class GeckoViewScrollContent extends GeckoViewContentModule {
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
     addEventListener("scroll", this, false);
   }
 
   onDisable() {
-    debug("onDisable");
+    debug `onDisable`;
     removeEventListener("scroll", this);
   }
 
   handleEvent(aEvent) {
     if (aEvent.originalTarget.defaultView != content) {
       return;
     }
 
-    debug("handleEvent " + aEvent.type);
+    debug `handleEvent: ${aEvent.type}`;
 
     switch (aEvent.type) {
       case "scroll":
         this.eventDispatcher.sendRequest({
           type: "GeckoView:ScrollChanged",
           scrollX: Math.round(content.scrollX),
           scrollY: Math.round(content.scrollY)
         });
--- a/mobile/android/chrome/geckoview/GeckoViewSelectionActionContent.js
+++ b/mobile/android/chrome/geckoview/GeckoViewSelectionActionContent.js
@@ -5,24 +5,16 @@
 
 ChromeUtils.import("resource://gre/modules/GeckoViewContentModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   Services: "resource://gre/modules/Services.jsm",
 });
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewSelectionActionContent"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 // Dispatches GeckoView:ShowSelectionAction and GeckoView:HideSelectionAction to
 // the GeckoSession on accessible caret changes.
 class GeckoViewSelectionActionContent extends GeckoViewContentModule {
   constructor(aModuleName, aMessageManager) {
     super(aModuleName, aMessageManager);
 
     this._seqNo = 0;
     this._isActive = false;
@@ -124,22 +116,22 @@ class GeckoViewSelectionActionContent ex
         break;
       }
     }
 
     return offset;
   }
 
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
     addEventListener("mozcaretstatechanged", this, { mozSystemGroup: true });
   }
 
   onDisable() {
-    debug("onDisable");
+    debug `onDisable`;
     removeEventListener("mozcaretstatechanged", this, { mozSystemGroup: true });
   }
 
   /**
    * Receive and act on AccessibleCarets caret state-change
    * (mozcaretstatechanged) events.
    */
   handleEvent(aEvent) {
@@ -156,17 +148,17 @@ class GeckoViewSelectionActionContent ex
                reason !== "longpressonemptycontent" &&
                reason !== "taponcaret") {
       // Don't show selection actions when merely focusing on an editor or
       // repositioning the cursor. Wait until long press or the caret is tapped
       // in order to match Android behavior.
       reason = "visibilitychange";
     }
 
-    debug("handleEvent " + reason + " " + aEvent);
+    debug `handleEvent: ${reason}`;
 
     if (["longpressonemptycontent",
          "releasecaret",
          "taponcaret",
          "updateposition"].includes(reason)) {
 
       const actions = this._actions.filter(
           action => action.predicate.call(this, aEvent));
@@ -202,31 +194,29 @@ class GeckoViewSelectionActionContent ex
         // Don't call again if we're already active and things haven't changed.
         return;
       }
 
       msg.seqNo = ++this._seqNo;
       this._isActive = true;
       this._previousMessage = JSON.stringify(msg);
 
-      debug("onShowSelectionAction " + JSON.stringify(msg));
-
       // This event goes to GeckoViewSelectionAction.jsm, where the data is
       // further transformed and then sent to GeckoSession.
       this.eventDispatcher.sendRequest(msg, {
         onSuccess: response => {
           if (response.seqNo !== this._seqNo) {
             // Stale action.
             return;
           }
           let action = actions.find(action => action.id === response.id);
           if (action) {
             action.perform.call(this, aEvent, response);
           } else {
-            dump("Invalid action " + response.id);
+            warn `Invalid action ${response.id}`;
           }
         },
         onError: _ => {
           // Do nothing; we can get here if the delegate was just unregistered.
         },
       });
 
     } else if (["invisibleselection",
@@ -248,16 +238,16 @@ class GeckoViewSelectionActionContent ex
       }
 
       this.eventDispatcher.sendRequest({
         type: "GeckoView:HideSelectionAction",
         reason: reason,
       });
 
     } else {
-      dump("Unknown reason: " + reason);
+      warn `Unknown reason: ${reason}`;
     }
   }
 }
 
 let {debug, warn} =
     GeckoViewSelectionActionContent.initLogging("GeckoViewSelectionAction");
 let module = GeckoViewSelectionActionContent.create(this);
--- a/mobile/android/chrome/geckoview/geckoview.js
+++ b/mobile/android/chrome/geckoview/geckoview.js
@@ -10,20 +10,16 @@ XPCOMUtils.defineLazyModuleGetters(this,
   EventDispatcher: "resource://gre/modules/Messaging.jsm",
   GeckoViewUtils: "resource://gre/modules/GeckoViewUtils.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "WindowEventDispatcher",
   () => EventDispatcher.for(window));
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "View"));
-
 // Creates and manages GeckoView modules.
 // A module must extend GeckoViewModule.
 // Instantiate a module by calling
 //   add(<resource path>, <type name>)
 // and remove by calling
 //   remove(<type name>)
 var ModuleManager = {
   init: function(aBrowser) {
--- a/mobile/android/components/geckoview/GeckoViewExternalAppService.js
+++ b/mobile/android/components/geckoview/GeckoViewExternalAppService.js
@@ -8,52 +8,46 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/GeckoViewUtils.jsm");
 
 /* global debug:false, warn:false */
 GeckoViewUtils.initLogging("GeckoView.ExternalAppService", this);
 
 ChromeUtils.defineModuleGetter(this, "EventDispatcher",
   "resource://gre/modules/Messaging.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewContent"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 function ExternalAppService() {
   this.wrappedJSObject = this;
 }
 
 ExternalAppService.prototype = {
   classID: Components.ID("{a89eeec6-6608-42ee-a4f8-04d425992f45}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIExternalHelperAppService]),
 
   doContent(mimeType, request, context, forceSave) {
     const channel = request.QueryInterface(Ci.nsIChannel);
     const mm = context.QueryInterface(Ci.nsIDocShell).tabChild.messageManager;
 
-    debug(`doContent() URI=${channel.URI.displaySpec}, contentType=${channel.contentType}`);
+    debug `doContent: uri=${ channel.URI.displaySpec
+                    } contentType=${ channel.contentType }`;
 
     EventDispatcher.forMessageManager(mm).sendRequest({
       type: "GeckoView:ExternalResponse",
       uri: channel.URI.displaySpec,
       contentType: channel.contentType,
       contentLength: channel.contentLength,
       filename: channel.contentDispositionFilename
     });
 
     request.cancel(Cr.NS_ERROR_ABORT);
     Components.returnCode = Cr.NS_ERROR_ABORT;
   },
 
   applyDecodingForExtension(ext, encoding) {
-    debug(`applyDecodingForExtension() extension=${ext}, encoding=${encoding}`);
+    debug `applyDecodingForExtension: extension=${ ext
+                                    } encoding=${ encoding }`;
 
     // This doesn't matter for us right now because
     // we shouldn't end up reading the stream.
     return true;
   }
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ExternalAppService]);
--- a/mobile/android/modules/geckoview/GeckoViewContent.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewContent.jsm
@@ -4,24 +4,16 @@
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["GeckoViewContent"];
 
 ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewContent"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 class GeckoViewContent extends GeckoViewModule {
   onInit() {
     this.eventDispatcher.registerListener(this, [
       "GeckoView:SetActive"
     ]);
   }
 
   onEnable() {
@@ -50,17 +42,18 @@ class GeckoViewContent extends GeckoView
     this.unregisterListener();
 
     this.messageManager.removeMessageListener("GeckoView:DOMFullscreenExit", this);
     this.messageManager.removeMessageListener("GeckoView:DOMFullscreenRequest", this);
   }
 
   // Bundle event handler.
   onEvent(aEvent, aData, aCallback) {
-    debug("onEvent: " + aEvent);
+    debug `onEvent: event=${aEvent}, data=${aData}`;
+
     switch (aEvent) {
       case "GeckoViewContent:ExitFullScreen":
         this.messageManager.sendAsyncMessage("GeckoView:DOMFullscreenExited");
         break;
       case "GeckoView:ZoomToInput":
         this.messageManager.sendAsyncMessage(aEvent);
         break;
       case "GeckoView:SetActive":
@@ -74,34 +67,34 @@ class GeckoViewContent extends GeckoView
           this.browser.blur();
         }
         break;
     }
   }
 
   // DOM event handler
   handleEvent(aEvent) {
-    debug("handleEvent: aEvent.type=" + aEvent.type);
+    debug `handleEvent: ${aEvent.type}`;
 
     switch (aEvent.type) {
       case "MozDOMFullscreen:Entered":
         if (this.browser == aEvent.target) {
           // Remote browser; dispatch to content process.
           this.messageManager.sendAsyncMessage("GeckoView:DOMFullscreenEntered");
         }
         break;
       case "MozDOMFullscreen:Exited":
         this.messageManager.sendAsyncMessage("GeckoView:DOMFullscreenExited");
         break;
     }
   }
 
   // Message manager event handler.
   receiveMessage(aMsg) {
-    debug("receiveMessage " + aMsg.name);
+    debug `receiveMessage: ${aMsg.name}`;
 
     switch (aMsg.name) {
       case "GeckoView:DOMFullscreenExit":
         this.window.QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIDOMWindowUtils)
                    .remoteFrameFullscreenReverted();
         break;
       case "GeckoView:DOMFullscreenRequest":
--- a/mobile/android/modules/geckoview/GeckoViewContentModule.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewContentModule.jsm
@@ -9,24 +9,16 @@ var EXPORTED_SYMBOLS = ["GeckoViewConten
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/GeckoViewUtils.jsm");
 
 GeckoViewUtils.initLogging("GeckoView.Module.[C]", this);
 
 ChromeUtils.defineModuleGetter(this, "EventDispatcher",
   "resource://gre/modules/Messaging.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewContentModule"));
-
-// function debug(aMsg) {
-//   dump(aMsg);
-// }
-
 class GeckoViewContentModule {
   static initLogging(aModuleName) {
     this._moduleName = aModuleName;
     const tag = aModuleName.replace("GeckoView", "GeckoView.") + ".[C]";
     return GeckoViewUtils.initLogging(tag, {});
   }
 
   static create(aGlobal, aModuleName) {
--- a/mobile/android/modules/geckoview/GeckoViewModule.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewModule.jsm
@@ -6,24 +6,16 @@
 
 var EXPORTED_SYMBOLS = ["GeckoViewModule"];
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/GeckoViewUtils.jsm");
 
 GeckoViewUtils.initLogging("GeckoView.Module", this);
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewModule"));
-
-// function debug(aMsg) {
-//   dump(aMsg);
-// }
-
 class GeckoViewModule {
   constructor(aModuleName, aWindow, aBrowser, aEventDispatcher) {
     this.isRegistered = false;
     this.window = aWindow;
     this.browser = aBrowser;
     this.eventDispatcher = aEventDispatcher;
     this.moduleName = aModuleName;
     this._isContentLoaded = false;
@@ -134,53 +126,53 @@ class EventProxy {
     this.listener = aListener;
     this.eventDispatcher = aEventDispatcher;
     this._eventQueue = [];
     this._registeredEvents = [];
     this._enableQueuing = false;
   }
 
   registerListener(aEventList) {
-    debug("register " + aEventList);
+    debug `registerListener ${aEventList}`;
     this.eventDispatcher.registerListener(this, aEventList);
     this._registeredEvents = this._registeredEvents.concat(aEventList);
   }
 
   unregisterListener() {
-    debug("unregister");
+    debug `unregisterListener`;
     if (this._registeredEvents.length === 0) {
       return;
     }
     this.eventDispatcher.unregisterListener(this, this._registeredEvents);
     this._registeredEvents = [];
   }
 
   onEvent(aEvent, aData, aCallback) {
     if (this._enableQueuing) {
-      debug("queue " + aEvent + ", aData=" + JSON.stringify(aData));
+      debug `queue ${aEvent}, data=${aData}`;
       this._eventQueue.unshift(arguments);
     } else {
       this._dispatch(...arguments);
     }
   }
 
   enableQueuing(aEnable) {
-    debug("enableQueuing " + aEnable);
+    debug `enableQueuing ${aEnable}`;
     this._enableQueuing = aEnable;
   }
 
   _dispatch(aEvent, aData, aCallback) {
-    debug("dispatch " + aEvent + ", aData=" + JSON.stringify(aData));
+    debug `dispatch ${aEvent}, data=${aData}`;
     if (this.listener.onEvent) {
       this.listener.onEvent(...arguments);
     } else {
       this.listener(...arguments);
     }
   }
 
   dispatchQueuedEvents() {
-    debug("dispatchQueued");
+    debug `dispatchQueued`;
     while (this._eventQueue.length) {
       const args = this._eventQueue.pop();
       this._dispatch(...args);
     }
   }
 }
--- a/mobile/android/modules/geckoview/GeckoViewNavigation.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewNavigation.jsm
@@ -13,24 +13,16 @@ ChromeUtils.defineModuleGetter(this, "Br
                                "resource://gre/modules/BrowserUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   EventDispatcher: "resource://gre/modules/Messaging.jsm",
   LoadURIDelegate: "resource://gre/modules/LoadURIDelegate.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewNavigation"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 // Handles navigation requests between Gecko and a GeckoView.
 // Handles GeckoView:GoBack and :GoForward requests dispatched by
 // GeckoView.goBack and .goForward.
 // Dispatches GeckoView:LocationChange to the GeckoView on location change when
 // active.
 // Implements nsIBrowserDOMWindow.
 class GeckoViewNavigation extends GeckoViewModule {
   onInitBrowser() {
@@ -49,17 +41,17 @@ class GeckoViewNavigation extends GeckoV
       "GeckoView:LoadUri",
       "GeckoView:Reload",
       "GeckoView:Stop"
     ]);
   }
 
   // Bundle event handler.
   onEvent(aEvent, aData, aCallback) {
-    debug("onEvent: aEvent=" + aEvent + ", aData=" + JSON.stringify(aData));
+    debug `onEvent: event=${aEvent}, data=${aData}`;
 
     switch (aEvent) {
       case "GeckoView:GoBack":
         this.browser.goBack();
         break;
       case "GeckoView:GoForward":
         this.browser.goForward();
         break;
@@ -96,17 +88,17 @@ class GeckoViewNavigation extends GeckoV
       case "GeckoView:Stop":
         this.browser.stop();
         break;
     }
   }
 
   // Message manager event handler.
   receiveMessage(aMsg) {
-    debug("receiveMessage " + aMsg.name);
+    debug `receiveMessage: ${aMsg.name}`;
   }
 
   waitAndSetOpener(aSessionId, aOpener) {
     if (!aSessionId) {
       return Promise.resolve(null);
     }
 
     return new Promise(resolve => {
@@ -123,19 +115,19 @@ class GeckoViewNavigation extends GeckoV
       };
 
       // This event is emitted from createBrowser() in geckoview.js
       Services.obs.addObserver(handler, "geckoview-window-created");
     });
   }
 
   handleNewSession(aUri, aOpener, aWhere, aFlags, aTriggeringPrincipal) {
-    debug("handleNewSession: aUri=" + (aUri && aUri.spec) +
-          " aWhere=" + aWhere +
-          " aFlags=" + aFlags);
+    debug `handleNewSession: uri=${ aUri && aUri.spec
+                           } where=${ aWhere
+                           } flags=${ aFlags }`;
 
     if (!this.isRegistered) {
       return null;
     }
 
     const message = {
       type: "GeckoView:OnNewSession",
       uri: aUri ? aUri.displaySpec : ""
@@ -153,19 +145,19 @@ class GeckoViewNavigation extends GeckoV
 
     // Wait indefinitely for app to respond with a browser or null
     Services.tm.spinEventLoopUntil(() => browser !== undefined);
     return browser;
   }
 
   // nsIBrowserDOMWindow.
   createContentWindow(aUri, aOpener, aWhere, aFlags, aTriggeringPrincipal) {
-    debug("createContentWindow: aUri=" + (aUri && aUri.spec) +
-          " aWhere=" + aWhere +
-          " aFlags=" + aFlags);
+    debug `createContentWindow: uri=${ aUri && aUri.spec
+                              } where=${ aWhere
+                              } flags=${ aFlags }`;
 
     if (LoadURIDelegate.load(this.eventDispatcher, aUri, aWhere, aFlags,
                              aTriggeringPrincipal)) {
       // The app has handled the load, abort open-window handling.
       Components.returnCode = Cr.NS_ERROR_ABORT;
       return null;
     }
 
@@ -177,22 +169,22 @@ class GeckoViewNavigation extends GeckoV
     }
 
     return browser.contentWindow;
   }
 
   // nsIBrowserDOMWindow.
   createContentWindowInFrame(aUri, aParams, aWhere, aFlags, aNextTabParentId,
                              aName) {
-    debug("createContentWindowInFrame: aUri=" + (aUri && aUri.spec) +
-          " aParams=" + aParams +
-          " aWhere=" + aWhere +
-          " aFlags=" + aFlags +
-          " aNextTabParentId=" + aNextTabParentId +
-          " aName=" + aName);
+    debug `createContentWindowInFrame: uri=${ aUri && aUri.spec
+                                     } params=${ aParams
+                                     } where=${ aWhere
+                                     } flags=${ aFlags
+                                     } nextTabParentId=${ aNextTabParentId
+                                     } name=${ aName }`;
 
     if (LoadURIDelegate.load(this.eventDispatcher, aUri, aWhere, aFlags, null)) {
       // The app has handled the load, abort open-window handling.
       Components.returnCode = Cr.NS_ERROR_ABORT;
       return null;
     }
 
     const browser = this.handleNewSession(aUri, null, aWhere, aFlags, null);
@@ -202,19 +194,19 @@ class GeckoViewNavigation extends GeckoV
     }
 
     browser.setAttribute("nextTabParentId", aNextTabParentId);
     return browser;
   }
 
   handleOpenUri(aUri, aOpener, aWhere, aFlags, aTriggeringPrincipal,
                 aNextTabParentId) {
-    debug("handleOpenUri: aUri=" + (aUri && aUri.spec) +
-          " aWhere=" + aWhere +
-          " aFlags=" + aFlags);
+    debug `handleOpenUri: uri=${ aUri && aUri.spec
+                        } where=${ aWhere
+                        } flags=${ aFlags }`;
 
     if (LoadURIDelegate.load(this.eventDispatcher, aUri, aWhere, aFlags,
                              aTriggeringPrincipal)) {
       return null;
     }
 
     let browser = this.browser;
 
@@ -249,59 +241,57 @@ class GeckoViewNavigation extends GeckoV
 
   // nsIBrowserDOMWindow.
   isTabContentWindow(aWindow) {
     return this.browser.contentWindow === aWindow;
   }
 
   // nsIBrowserDOMWindow.
   canClose() {
-    debug("canClose");
+    debug `canClose`;
     return true;
   }
 
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
 
     this.registerContent(
       "chrome://geckoview/content/GeckoViewNavigationContent.js");
 
     let flags = Ci.nsIWebProgress.NOTIFY_LOCATION;
     this.progressFilter =
       Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
       .createInstance(Ci.nsIWebProgress);
     this.progressFilter.addProgressListener(this, flags);
     this.browser.addProgressListener(this.progressFilter, flags);
   }
 
   onDisable() {
-    debug("onDisable");
+    debug `onDisable`;
 
     if (!this.progressFilter) {
       return;
     }
     this.progressFilter.removeProgressListener(this);
     this.browser.removeProgressListener(this.progressFilter);
   }
 
   // WebProgress event handler.
   onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
-    debug("onLocationChange");
+    debug `onLocationChange`;
 
     let fixedURI = aLocationURI;
 
     try {
       fixedURI = Services.uriFixup.createExposableURI(aLocationURI);
     } catch (ex) { }
 
     let message = {
       type: "GeckoView:LocationChange",
       uri: fixedURI.displaySpec,
       canGoBack: this.browser.canGoBack,
       canGoForward: this.browser.canGoForward,
       isTopLevel: aWebProgress.isTopLevel,
     };
 
-    debug("dispatch " + JSON.stringify(message));
-
     this.eventDispatcher.sendRequest(message);
   }
 }
--- a/mobile/android/modules/geckoview/GeckoViewProgress.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewProgress.jsm
@@ -11,24 +11,16 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "OverrideService",
   "@mozilla.org/security/certoverride;1", "nsICertOverrideService");
 
 XPCOMUtils.defineLazyServiceGetter(this, "IDNService",
   "@mozilla.org/network/idn-service;1", "nsIIDNService");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewProgress"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 var IdentityHandler = {
   // The definitions below should be kept in sync with those in GeckoView.ProgressListener.SecurityInformation
   // No trusted identity information. No site identity icon is shown.
   IDENTITY_MODE_UNKNOWN: 0,
 
   // Domain-Validation SSL CA-signed domain verification (DV).
   IDENTITY_MODE_IDENTIFIED: 1,
 
@@ -187,54 +179,56 @@ var IdentityHandler = {
 };
 
 class GeckoViewProgress extends GeckoViewModule {
   onInit() {
     this._hostChanged = false;
   }
 
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
 
     let flags = Ci.nsIWebProgress.NOTIFY_STATE_NETWORK |
                 Ci.nsIWebProgress.NOTIFY_SECURITY |
                 Ci.nsIWebProgress.NOTIFY_LOCATION;
     this.progressFilter =
       Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
       .createInstance(Ci.nsIWebProgress);
     this.progressFilter.addProgressListener(this, flags);
     this.browser.addProgressListener(this.progressFilter, flags);
   }
 
   onDisable() {
-    debug("onDisable");
+    debug `onDisable`;
 
     if (this.progressFilter) {
       this.progressFilter.removeProgressListener(this);
       this.browser.removeProgressListener(this.progressFilter);
     }
   }
 
   onSettingsUpdate() {
-    let settings = this.settings;
-    debug("onSettingsUpdate: " + JSON.stringify(settings));
+    const settings = this.settings;
+    debug `onSettingsUpdate: ${settings}`;
 
     IdentityHandler.setUseTrackingProtection(!!settings.useTrackingProtection);
     IdentityHandler.setUsePrivateMode(!!settings.usePrivateMode);
   }
 
   onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
-    debug(`onStateChange() isTopLevel=${aWebProgress.isTopLevel}, stateFlags=${aStateFlags}, state=${aStatus}`);
+    debug `onStateChange: isTopLevel=${ aWebProgress.isTopLevel
+                       }, flags=${ aStateFlags
+                       }, status=${ aStatus }`;
 
     if (!aWebProgress.isTopLevel) {
       return;
     }
 
     const uriSpec = aRequest.QueryInterface(Ci.nsIChannel).URI.displaySpec;
-    debug(`onStateChange() URI=${uriSpec}`);
+    debug `onStateChange: uri=${uriSpec}`;
 
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
       const message = {
         type: "GeckoView:PageStart",
         uri: uriSpec,
       };
 
       this.eventDispatcher.sendRequest(message);
@@ -245,17 +239,17 @@ class GeckoViewProgress extends GeckoVie
         success: !aStatus
       };
 
       this.eventDispatcher.sendRequest(message);
     }
   }
 
   onSecurityChange(aWebProgress, aRequest, aState) {
-    debug("onSecurityChange()");
+    debug `onSecurityChange`;
 
     // Don't need to do anything if the data we use to update the UI hasn't changed
     if (this._state === aState && !this._hostChanged) {
       return;
     }
 
     this._state = aState;
     this._hostChanged = false;
@@ -266,17 +260,18 @@ class GeckoViewProgress extends GeckoVie
       type: "GeckoView:SecurityChanged",
       identity: identity
     };
 
     this.eventDispatcher.sendRequest(message);
   }
 
   onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
-    debug(`onLocationChange() location=${aLocationURI.displaySpec}, flags=${aFlags}`);
+    debug `onLocationChange: location=${ aLocationURI.displaySpec
+                          }, flags=${ aFlags }`;
 
     this._hostChanged = true;
     if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) {
       // We apparently don't get a STATE_STOP in onStateChange(), so emit PageStop here
       this.eventDispatcher.sendRequest({
         type: "GeckoView:PageStop",
         success: false
       });
--- a/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm
@@ -5,30 +5,22 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = ["GeckoViewRemoteDebugger"];
 
 ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-  ChromeUtils.import("resource://gre/modules/AndroidLog.jsm", {})
-    .AndroidLog.d.bind(null, "ViewRemoteDebugger"));
-
 XPCOMUtils.defineLazyGetter(this, "DebuggerServer", () => {
   const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
   const { DebuggerServer } = require("devtools/server/main");
   return DebuggerServer;
 });
 
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 class GeckoViewRemoteDebugger extends GeckoViewModule {
   onInit() {
     this._isEnabled = false;
     this._usbDebugger = new USBRemoteDebugger();
   }
 
   onSettingsUpdate() {
     let enabled = this.settings.useRemoteDebugger;
@@ -50,17 +42,17 @@ class GeckoViewRemoteDebugger extends Ge
     let windowId = this.window.QueryInterface(Ci.nsIInterfaceRequestor)
                               .getInterface(Ci.nsIDOMWindowUtils)
                               .outerWindowID;
     let env = Cc["@mozilla.org/process/environment;1"]
               .getService(Ci.nsIEnvironment);
     let dataDir = env.get("MOZ_ANDROID_DATA_DIR");
 
     if (!dataDir) {
-      debug("Missing env MOZ_ANDROID_DATA_DIR - aborting debugger server start");
+      warn `Missing env MOZ_ANDROID_DATA_DIR - aborting debugger server start`;
       return;
     }
 
     this._isEnabled = true;
     this._usbDebugger.stop();
 
     let portOrPath = dataDir + "/firefox-debugger-socket-" + windowId;
     this._usbDebugger.start(portOrPath);
@@ -77,32 +69,32 @@ class USBRemoteDebugger {
     try {
       let AuthenticatorType = DebuggerServer.Authenticators.get("PROMPT");
       let authenticator = new AuthenticatorType.Server();
       authenticator.allowConnection = this.allowConnection.bind(this);
       this._listener = DebuggerServer.createListener();
       this._listener.portOrPath = aPortOrPath;
       this._listener.authenticator = authenticator;
       this._listener.open();
-      debug(`USB remote debugger - listening on ${aPortOrPath}`);
+      debug `USB remote debugger - listening on ${aPortOrPath}`;
     } catch (e) {
-      debug("Unable to start USB debugger server: " + e);
+      warn `Unable to start USB debugger server: ${e}`;
     }
   }
 
   stop() {
     if (!this._listener) {
       return;
     }
 
     try {
       this._listener.close();
       this._listener = null;
     } catch (e) {
-      debug("Unable to stop USB debugger server: " + e);
+      warn `Unable to stop USB debugger server: ${e}`;
     }
   }
 
   allowConnection(aSession) {
     if (!this._listener) {
       return DebuggerServer.AuthenticationResult.DENY;
     }
 
--- a/mobile/android/modules/geckoview/GeckoViewScroll.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewScroll.jsm
@@ -4,22 +4,14 @@
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["GeckoViewScroll"];
 
 ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewScroll"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 class GeckoViewScroll extends GeckoViewModule {
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
     this.registerContent("chrome://geckoview/content/GeckoViewScrollContent.js");
   }
 }
--- a/mobile/android/modules/geckoview/GeckoViewSelectionAction.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewSelectionAction.jsm
@@ -4,23 +4,15 @@
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["GeckoViewSelectionAction"];
 
 ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewSelectionAction"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 // Handles inter-op between accessible carets and GeckoSession.
 class GeckoViewSelectionAction extends GeckoViewModule {
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
     this.registerContent("chrome://geckoview/content/GeckoViewSelectionActionContent.js");
   }
 }
--- a/mobile/android/modules/geckoview/GeckoViewSettings.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewSettings.jsm
@@ -24,24 +24,16 @@ XPCOMUtils.defineLazyGetter(
   this, "DESKTOP_USER_AGENT",
   function() {
     return Cc["@mozilla.org/network/protocol;1?name=http"]
            .getService(Ci.nsIHttpProtocolHandler).userAgent
            .replace(/Android \d.+?; [a-zA-Z]+/, "X11; Linux x86_64")
            .replace(/Gecko\/[0-9\.]+/, "Gecko/20100101");
   });
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewSettings"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 // Handles GeckoView settings including:
 // * multiprocess
 // * user agent override
 class GeckoViewSettings extends GeckoViewModule {
   onInitBrowser() {
     if (this.settings.useMultiprocess) {
       this.browser.setAttribute("remote", "true");
     }
@@ -51,38 +43,39 @@ class GeckoViewSettings extends GeckoVie
     this._useTrackingProtection = false;
     this._useDesktopMode = false;
 
     this.registerContent(
         "chrome://geckoview/content/GeckoViewContentSettings.js");
   }
 
   onSettingsUpdate() {
-    debug("onSettingsUpdate: " + JSON.stringify(this.settings));
+    const settings = this.settings;
+    debug `onSettingsUpdate: ${settings}`;
 
-    this.displayMode = this.settings.displayMode;
-    this.useTrackingProtection = !!this.settings.useTrackingProtection;
-    this.useDesktopMode = !!this.settings.useDesktopMode;
+    this.displayMode = settings.displayMode;
+    this.useTrackingProtection = !!settings.useTrackingProtection;
+    this.useDesktopMode = !!settings.useDesktopMode;
   }
 
   get useMultiprocess() {
     return this.browser.isRemoteBrowser;
   }
 
   get useTrackingProtection() {
     return this._useTrackingProtection;
   }
 
   set useTrackingProtection(aUse) {
     aUse && SafeBrowsing;
     this._useTrackingProtection = aUse;
   }
 
   onUserAgentRequest(aSubject, aTopic, aData) {
-    debug("onUserAgentRequest");
+    debug `onUserAgentRequest`;
 
     let channel = aSubject.QueryInterface(Ci.nsIHttpChannel);
 
     if (this.browser.outerWindowID !== channel.topLevelOuterContentWindowId) {
       return;
     }
 
     if (this.useDesktopMode) {
--- a/mobile/android/modules/geckoview/GeckoViewTab.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewTab.jsm
@@ -4,24 +4,16 @@
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["GeckoViewTab"];
 
 ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-                       {}).AndroidLog.d.bind(null, "ViewTab"));
-
-// function debug(aMsg) {
-//   dump(aMsg);
-// }
-
 // Stub BrowserApp implementation for WebExtensions support.
 class GeckoViewTab extends GeckoViewModule {
   onInit() {
     this.browser.tab = { id: 0, browser: this.browser };
 
     this.window.gBrowser = this.window.BrowserApp = {
       selectedBrowser: this.browser,
       tabs: [this.browser.tab],
--- a/mobile/android/modules/geckoview/GeckoViewTrackingProtection.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewTrackingProtection.jsm
@@ -4,38 +4,30 @@
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["GeckoViewTrackingProtection"];
 
 ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "dump", () =>
-    ChromeUtils.import("resource://gre/modules/AndroidLog.jsm",
-              {}).AndroidLog.d.bind(null, "ViewTrackingProtection"));
-
-function debug(aMsg) {
-  // dump(aMsg);
-}
-
 class GeckoViewTrackingProtection extends GeckoViewModule {
   onEnable() {
-    debug("onEnable");
+    debug `onEnable`;
 
     const flags = Ci.nsIWebProgress.NOTIFY_SECURITY;
     this.progressFilter =
       Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
       .createInstance(Ci.nsIWebProgress);
     this.progressFilter.addProgressListener(this, flags);
     this.browser.addProgressListener(this.progressFilter, flags);
   }
 
   onSecurityChange(aWebProgress, aRequest, aState) {
-    debug("onSecurityChange");
+    debug `onSecurityChange`;
 
     if (!(aState & Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT) ||
         !aRequest || !(aRequest instanceof Ci.nsIClassifiedChannel)) {
       return;
     }
 
     let channel = aRequest.QueryInterface(Ci.nsIChannel);
     let uri = channel.URI && channel.URI.spec;