[tbb-commits] [tor-browser/tor-browser-60.6.1esr-9.0-1] Bug 1407366 - Part 1: Rename the LanguagePrompt.jsm to RFPHelper.jsm and changing the place of doing uninitialization. r=johannh

gk at torproject.org gk at torproject.org
Fri May 17 07:43:38 UTC 2019


commit 0958b375400c51ddd1c61cda14acae686697729b
Author: Tom Ritter <tom at mozilla.com>
Date:   Wed Apr 24 09:13:27 2019 -0500

    Bug 1407366 - Part 1: Rename the LanguagePrompt.jsm to RFPHelper.jsm and changing the place of doing uninitialization. r=johannh
    
    This patch changes the name of LanguagePrompt.jsm to RFPHelper.jsm.
    The RFPHelper is going to not only be responsible for the language
---
 browser/base/content/browser.js                                     | 4 +---
 browser/components/nsBrowserGlue.js                                 | 5 +++--
 .../resistfingerprinting/{LanguagePrompt.jsm => RFPHelper.jsm}      | 6 +++---
 toolkit/components/resistfingerprinting/moz.build                   | 2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 16e712be0ba3..3e3b1b203219 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -29,7 +29,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
   E10SUtils: "resource://gre/modules/E10SUtils.jsm",
   ExtensionsUI: "resource:///modules/ExtensionsUI.jsm",
   FormValidationHandler: "resource:///modules/FormValidationHandler.jsm",
-  LanguagePrompt: "resource://gre/modules/LanguagePrompt.jsm",
   LightweightThemeConsumer: "resource://gre/modules/LightweightThemeConsumer.jsm",
   LightweightThemeManager: "resource://gre/modules/LightweightThemeManager.jsm",
   Log: "resource://gre/modules/Log.jsm",
@@ -47,6 +46,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
   PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
   ReaderMode: "resource://gre/modules/ReaderMode.jsm",
   ReaderParent: "resource:///modules/ReaderParent.jsm",
+  RFPHelper: "resource://gre/modules/RFPHelper.jsm",
   RecentWindow: "resource:///modules/RecentWindow.jsm",
   SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
   Sanitizer: "resource:///modules/Sanitizer.jsm",
@@ -1908,8 +1908,6 @@ var gBrowserInit = {
 
     gAccessibilityServiceIndicator.uninit();
 
-    LanguagePrompt.uninit();
-
     BrowserSearch.uninit();
 
     // Now either cancel delayedStartup, or clean up the services initialized from
diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js
index 861a62e442df..564035bfd3a2 100644
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -104,7 +104,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
   HybridContentTelemetry: "resource://gre/modules/HybridContentTelemetry.jsm",
   Integration: "resource://gre/modules/Integration.jsm",
   L10nRegistry: "resource://gre/modules/L10nRegistry.jsm",
-  LanguagePrompt: "resource://gre/modules/LanguagePrompt.jsm",
   LightweightThemeManager: "resource://gre/modules/LightweightThemeManager.jsm",
   LoginHelper: "resource://gre/modules/LoginHelper.jsm",
   LoginManagerParent: "resource://gre/modules/LoginManagerParent.jsm",
@@ -126,6 +125,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
   ReaderParent: "resource:///modules/ReaderParent.jsm",
   RecentWindow: "resource:///modules/RecentWindow.jsm",
   RemotePrompt: "resource:///modules/RemotePrompt.jsm",
+  RFPHelper: "resource://gre/modules/RFPHelper.jsm",
   SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
   Sanitizer: "resource:///modules/Sanitizer.jsm",
   SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
@@ -1058,6 +1058,7 @@ BrowserGlue.prototype = {
     }
 
     Normandy.uninit();
+    RFPHelper.uninit();
   },
 
   // All initial windows have opened.
@@ -1220,7 +1221,7 @@ BrowserGlue.prototype = {
     }
 
     Services.tm.idleDispatchToMainThread(() => {
-      LanguagePrompt.init();
+      RFPHelper.init();
     });
 
     Services.tm.idleDispatchToMainThread(() => {
diff --git a/toolkit/components/resistfingerprinting/LanguagePrompt.jsm b/toolkit/components/resistfingerprinting/RFPHelper.jsm
old mode 100644
new mode 100755
similarity index 98%
rename from toolkit/components/resistfingerprinting/LanguagePrompt.jsm
rename to toolkit/components/resistfingerprinting/RFPHelper.jsm
index d27402ccacf1..2e8e85072364
--- a/toolkit/components/resistfingerprinting/LanguagePrompt.jsm
+++ b/toolkit/components/resistfingerprinting/RFPHelper.jsm
@@ -4,7 +4,7 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
-var EXPORTED_SYMBOLS = ["LanguagePrompt"];
+var EXPORTED_SYMBOLS = ["RFPHelper"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -13,7 +13,7 @@ const kPrefResistFingerprinting = "privacy.resistFingerprinting";
 const kPrefSpoofEnglish = "privacy.spoof_english";
 const kTopicHttpOnModifyRequest = "http-on-modify-request";
 
-class _LanguagePrompt {
+class _RFPHelper {
   constructor() {
     this._initialized = false;
   }
@@ -200,4 +200,4 @@ class _LanguagePrompt {
   }
 }
 
-let LanguagePrompt = new _LanguagePrompt();
+let RFPHelper = new _RFPHelper();
diff --git a/toolkit/components/resistfingerprinting/moz.build b/toolkit/components/resistfingerprinting/moz.build
index 88525f6189eb..021f2786f966 100644
--- a/toolkit/components/resistfingerprinting/moz.build
+++ b/toolkit/components/resistfingerprinting/moz.build
@@ -21,5 +21,5 @@ EXPORTS.mozilla += [
 ]
 
 EXTRA_JS_MODULES += [
-    'LanguagePrompt.jsm',
+    'RFPHelper.jsm',
 ]





More information about the tbb-commits mailing list