Bug 1489458 - Remove extraneous console logging in browser.js.;r=VladBaicu
authorBrad Arant <brad.arant@softvision.com>
Fri, 28 Jun 2019 12:32:14 +0000
changeset 543654 b788a1f2f095478c9bd82cc606e803b3bfbaf3e5
parent 543653 e908f503555192f9eb1f51e603d67a84618b626f
child 543655 405a1aaa16c5b874f6544930e25b2c0f6c4134b6
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersVladBaicu
bugs1489458
milestone69.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 1489458 - Remove extraneous console logging in browser.js.;r=VladBaicu Differential Revision: https://phabricator.services.mozilla.com/D36284
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -519,17 +519,16 @@ var BrowserApp = {
 
     // We can't delay registering WebChannel listeners: if the first page is
     // about:accounts, which can happen when starting the Firefox Account flow
     // from the first run experience, or via the Firefox Account Status
     // Activity, we can and do miss messages from the fxa-content-server.
     // However, we never allow suitably restricted profiles from listening to
     // fxa-content-server messages.
     if (ParentalControls.isAllowed(ParentalControls.MODIFY_ACCOUNTS)) {
-      console.log("browser.js: loading Firefox Accounts WebChannel");
       var {EnsureFxAccountsWebChannel} = ChromeUtils.import("resource://gre/modules/FxAccountsWebChannel.jsm");
       EnsureFxAccountsWebChannel();
     } else {
       console.log("browser.js: not loading Firefox Accounts WebChannel; this profile cannot connect to Firefox Accounts.");
     }
 
     // Notify Java that Gecko has loaded.
     GlobalEventDispatcher.sendRequest({ type: "Gecko:Ready" });
@@ -582,17 +581,16 @@ var BrowserApp = {
 
     return this._startupStatus;
   },
 
   /**
    * Pass this a locale string, such as "fr" or "es_ES".
    */
   setLocale: function(locale) {
-    console.log("browser.js: requesting locale set: " + locale);
     WindowEventDispatcher.sendRequest({ type: "Locale:Set", locale: locale });
   },
 
   initContextMenu: function() {
     // We pass a thunk in place of a raw label string. This allows the
     // context menu to automatically accommodate locale changes without
     // having to be rebuilt.
     let stringGetter = name => () => Strings.browser.GetStringFromName(name);
@@ -1770,24 +1768,21 @@ var BrowserApp = {
 
       case "FullScreen:Exit":
         browser.contentDocument.exitFullscreen();
         break;
 
       case "Locale:OS": {
         // We know the system locale. We use this for generating Accept-Language headers.
         let languageTag = data.languageTag;
-        console.log("Locale:OS: " + languageTag);
         let currentOSLocale = this.getOSLocalePref();
         if (currentOSLocale == languageTag) {
           break;
         }
 
-        console.log("New OS locale.");
-
         // Ensure that this choice is immediately persisted, because
         // Gecko won't be told again if it forgets.
         Services.prefs.setCharPref("intl.locale.os", languageTag);
         Services.prefs.savePrefFile(null);
 
         this.computeAcceptLanguages(languageTag);
 
         // Rebuild strings, in case we're mirroring OS locale.
@@ -1797,18 +1792,16 @@ var BrowserApp = {
 
       case "Locale:Changed": {
         if (data) {
           Services.locale.requestedLocales = [data.languageTag];
         } else {
           Services.locale.requestedLocales = [];
         }
 
-        console.log("Gecko display locale: " + this.getUALocalePref());
-
         // Rebuild strings to reflect the new locale.
         Strings.flush();
 
         // Make sure we use the right Accept-Language header.
         let osLocale = Services.prefs.getCharPref("intl.locale.os");
 
         this.computeAcceptLanguages(osLocale);
         break;
@@ -2151,17 +2144,16 @@ var BrowserApp = {
    * input; all Accept-Language logic lives here.
    *
    * osLocale should never be null, but this method is safe regardless.
    * appLocale may explicitly be null.
    */
   computeAcceptLanguages(osLocale) {
     let defaultBranch = Services.prefs.getDefaultBranch(null);
     let defaultAccept = defaultBranch.getComplexValue("intl.accept_languages", Ci.nsIPrefLocalizedString).data;
-    console.log("Default intl.accept_languages = " + defaultAccept);
 
     // A guard for potential breakage. Bug 438031.
     // This should not be necessary, because we're reading from the default branch,
     // but better safe than sorry.
     if (defaultAccept && defaultAccept.startsWith("chrome://")) {
       defaultAccept = null;
     } else {
       // Ensure lowercase everywhere so we can compare.
@@ -2197,17 +2189,16 @@ var BrowserApp = {
       for (let locale of defaults) {
         if (!chosen.includes(locale)) {
           chosen.push(locale);
         }
       }
     }
 
     let result = chosen.join(",");
-    console.log("Setting intl.accept_languages to " + result);
     this.setLocalizedPref("intl.accept_languages", result);
   },
 
   // nsIAndroidBrowserApp
   get selectedTab() {
     return this._selectedTab;
   },
 
@@ -2410,17 +2401,17 @@ var NativeWindow = {
    *        Doorhanger type to display (e.g., LOGIN)
    */
     show: function(aMessage, aValue, aButtons, aTabID, aOptions, aCategory) {
       if (aButtons == null) {
         aButtons = [];
       }
 
       if (aButtons.length > 2) {
-        console.log("Doorhanger can have a maximum of two buttons!");
+        console.warn("Doorhanger can have a maximum of two buttons!");
         aButtons.length = 2;
       }
 
       aButtons.forEach(aButton => {
         this._callbacks[this._callbacksId] = { cb: aButton.callback, prompt: this._promptId };
         aButton.callback = this._callbacksId;
         this._callbacksId++;
       });