Merge mozilla-central to mozilla-inbound. CLOSED TREE
authorCsoregi Natalia <ncsoregi@mozilla.com>
Wed, 06 Mar 2019 12:41:59 +0200
changeset 520474 5cdbf803ecc052cdff722cc0d3d0393af1922660
parent 520473 d33d48a3998ab78902c384c9a6f752fc74b1fa8e (current diff)
parent 520413 3e0cf2f77f07b258e8911ab5fd71a378c46fa1ec (diff)
child 520475 0d10f1a69e9a989db9acae2a9ec49a46ee4dbec8
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone67.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
Merge mozilla-central to mozilla-inbound. CLOSED TREE
netwerk/url-classifier/UrlClassifierFeatureCryptomining.cpp
netwerk/url-classifier/UrlClassifierFeatureCryptomining.h
netwerk/url-classifier/UrlClassifierFeatureFingerprinting.cpp
netwerk/url-classifier/UrlClassifierFeatureFingerprinting.h
--- a/devtools/client/debugger/new/src/actions/pause/skipPausing.js
+++ b/devtools/client/debugger/new/src/actions/pause/skipPausing.js
@@ -1,21 +1,20 @@
 /* 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/>. */
 
 // @flow
 
 import type { ThunkArgs } from "../types";
-import { getSkipPausing, getCurrentThread } from "../../selectors";
+import { getSkipPausing } from "../../selectors";
 
 /**
  * @memberof actions/pause
  * @static
  */
 export function toggleSkipPausing() {
   return async ({ dispatch, client, getState, sourceMaps }: ThunkArgs) => {
-    const thread = getCurrentThread(getState());
     const skipPausing = !getSkipPausing(getState());
-    await client.setSkipPausing(thread, skipPausing);
-    dispatch({ type: "TOGGLE_SKIP_PAUSING", thread, skipPausing });
+    await client.setSkipPausing(skipPausing);
+    dispatch({ type: "TOGGLE_SKIP_PAUSING", skipPausing });
   };
 }
--- a/devtools/client/debugger/new/src/client/firefox/commands.js
+++ b/devtools/client/debugger/new/src/client/firefox/commands.js
@@ -90,16 +90,24 @@ function lookupConsoleClient(thread: str
   }
   return workerClients[thread].console;
 }
 
 function listWorkerThreadClients() {
   return (Object.values(workerClients): any).map(({ thread }) => thread);
 }
 
+function forEachWorkerThread(iteratee) {
+  const promises = listWorkerThreadClients().map(thread => iteratee(thread));
+
+  if (shouldWaitForWorkers) {
+    return Promise.all(promises);
+  }
+}
+
 function resume(thread: string): Promise<*> {
   return new Promise(resolve => {
     lookupThreadClient(thread).resume(resolve);
   });
 }
 
 function stepIn(thread: string): Promise<*> {
   return new Promise(resolve => {
@@ -203,43 +211,27 @@ async function setBreakpoint(
   await threadClient.setBreakpoint(location, options);
 
   // Set breakpoints in other threads as well, but do not wait for the requests
   // to complete, so that we don't get hung up if one of the threads stops
   // responding. We don't strictly need to wait for the main thread to finish
   // setting its breakpoint, but this leads to more consistent behavior if the
   // user sets a breakpoint and immediately starts interacting with the page.
   // If the main thread stops responding then we're toast regardless.
-  if (shouldWaitForWorkers) {
-    for (const thread of listWorkerThreadClients()) {
-      await thread.setBreakpoint(location, options);
-    }
-  } else {
-    for (const thread of listWorkerThreadClients()) {
-      thread.setBreakpoint(location, options);
-    }
-  }
+  await forEachWorkerThread(thread => thread.setBreakpoint(location, options));
 }
 
 async function removeBreakpoint(location: BreakpointLocation) {
   maybeClearLogpoint(location);
   delete breakpoints[locationKey(location)];
   await threadClient.removeBreakpoint(location);
 
   // Remove breakpoints without waiting for the thread to respond, for the same
   // reason as in setBreakpoint.
-  if (shouldWaitForWorkers) {
-    for (const thread of listWorkerThreadClients()) {
-      await thread.removeBreakpoint(location);
-    }
-  } else {
-    for (const thread of listWorkerThreadClients()) {
-      thread.removeBreakpoint(location);
-    }
-  }
+  await forEachWorkerThread(thread => thread.removeBreakpoint(location));
 }
 
 async function evaluateInFrame(script: Script, options: EvaluateParam) {
   return evaluate(script, options);
 }
 
 async function evaluateExpressions(scripts: Script[], options: EvaluateParam) {
   return Promise.all(scripts.map(script => evaluate(script, options)));
@@ -335,23 +327,19 @@ async function blackBox(
   const sourceClient = threadClient.source({ actor: sourceActor.actor });
   if (isBlackBoxed) {
     await sourceClient.unblackBox(range);
   } else {
     await sourceClient.blackBox(range);
   }
 }
 
-async function setSkipPausing(thread: string, shouldSkip: boolean) {
-  const client = lookupThreadClient(thread);
-  return client.request({
-    skip: shouldSkip,
-    to: client.actor,
-    type: "skipBreakpoints"
-  });
+async function setSkipPausing(shouldSkip: boolean) {
+  await threadClient.skipBreakpoints(shouldSkip);
+  await forEachWorkerThread(thread => thread.skipBreakpoints(shouldSkip));
 }
 
 function interrupt(thread: string): Promise<*> {
   return lookupThreadClient(thread).interrupt();
 }
 
 function setEventListenerBreakpoints(eventTypes: EventListenerBreakpoints) {
   // TODO: Figure out what sendpoint we want to hit
--- a/devtools/client/debugger/new/src/client/firefox/types.js
+++ b/devtools/client/debugger/new/src/client/firefox/types.js
@@ -355,17 +355,18 @@ export type ThreadClient = {
   addListener: (string, Function) => void,
   getSources: () => Promise<SourcesPacket>,
   reconfigure: ({ observeAsmJS: boolean }) => Promise<*>,
   getLastPausePacket: () => ?PausedPacket,
   _parent: TabClient,
   actor: ActorId,
   request: (payload: Object) => Promise<*>,
   url: string,
-  setEventListenerBreakpoints: (string[]) => void
+  setEventListenerBreakpoints: (string[]) => void,
+  skipBreakpoints: boolean => Promise<{| skip: boolean |}>
 };
 
 export type FirefoxClientConnection = {
   getTabTarget: () => TabTarget,
   getThreadClient: () => ThreadClient,
   setTabTarget: (target: TabTarget) => void,
   setThreadClient: (client: ThreadClient) => void
 };
--- a/devtools/client/debugger/new/src/reducers/pause.js
+++ b/devtools/client/debugger/new/src/reducers/pause.js
@@ -65,31 +65,32 @@ type ThreadPauseState = {
   },
   selectedFrameId: ?string,
   loadedObjects: Object,
   shouldPauseOnExceptions: boolean,
   shouldPauseOnCaughtExceptions: boolean,
   command: Command,
   lastCommand: Command,
   wasStepping: boolean,
-  previousLocation: ?MappedLocation,
-  skipPausing: boolean
+  previousLocation: ?MappedLocation
 };
 
 // Pause state describing all threads.
 export type PauseState = {
   currentThread: string,
   canRewind: boolean,
-  threads: { [string]: ThreadPauseState }
+  threads: { [string]: ThreadPauseState },
+  skipPausing: boolean
 };
 
 export const createPauseState = (): PauseState => ({
   currentThread: "UnknownThread",
   threads: {},
-  canRewind: false
+  canRewind: false,
+  skipPausing: prefs.skipPausing
 });
 
 const resumedPauseState = {
   frames: null,
   frameScopes: {
     generated: {},
     original: {},
     mappings: {}
@@ -102,18 +103,17 @@ const resumedPauseState = {
 const createInitialPauseState = () => ({
   ...resumedPauseState,
   isWaitingOnBreak: false,
   shouldPauseOnExceptions: prefs.pauseOnExceptions,
   shouldPauseOnCaughtExceptions: prefs.pauseOnCaughtExceptions,
   canRewind: false,
   command: null,
   lastCommand: null,
-  previousLocation: null,
-  skipPausing: prefs.skipPausing
+  previousLocation: null
 });
 
 function getThreadPauseState(state: PauseState, thread: string) {
   // Thread state is lazily initialized so that we don't have to keep track of
   // the current set of worker threads.
   return state.threads[thread] || createInitialPauseState();
 }
 
@@ -299,17 +299,17 @@ function update(
           }
         }
       };
 
     case "TOGGLE_SKIP_PAUSING": {
       const { skipPausing } = action;
       prefs.skipPausing = skipPausing;
 
-      return updateThreadState({ skipPausing });
+      return { ...state, skipPausing };
     }
   }
 
   return state;
 }
 
 function getPauseLocation(state, action) {
   const { frames, previousLocation } = state;
@@ -548,17 +548,17 @@ export const getSelectedFrame: Selector<
       return null;
     }
 
     return frames.find(frame => frame.id == selectedFrameId);
   }
 );
 
 export function getSkipPausing(state: OuterState) {
-  return getCurrentPauseState(state).skipPausing;
+  return state.pause.skipPausing;
 }
 
 // NOTE: currently only used for chrome
 export function getChromeScopes(state: OuterState) {
   const frame: ?ChromeFrame = (getSelectedFrame(state): any);
   return frame ? frame.scopeChain : undefined;
 }
 
--- a/devtools/client/debugger/new/test/mochitest/browser_dbg-breakpoint-skipping.js
+++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-breakpoint-skipping.js
@@ -1,16 +1,26 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function skipPausing(dbg) {
   clickElementWithSelector(dbg, ".command-bar-skip-pausing");
   return waitForState(dbg, state => dbg.selectors.getSkipPausing(state))
 }
 
+/*
+ * Tests toggling the skip pausing button and 
+ * invoking functions without pausing.
+ */
+
 add_task(async function() {
   let dbg = await initDebugger("doc-scripts.html");
   await addBreakpoint(dbg, "simple3", 2);
 
   await skipPausing(dbg);
-  const res = await invokeInTab("simple")
-  is(res, 3, "simple() successfully completed")
+  let res = await invokeInTab("simple");
+  is(res, 3, "simple() successfully completed");
+
+  info("Reload and invoke again");
+  reload(dbg, "simple3");
+  res = await invokeInTab("simple");
+  is(res, 3, "simple() successfully completed");
 });
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -238,18 +238,20 @@ void Navigator::GetUserAgent(nsAString& 
 
       if (!customUserAgent.IsEmpty()) {
         aUserAgent = customUserAgent;
         return;
       }
     }
   }
 
-  nsresult rv =
-      GetUserAgent(window, aCallerType == CallerType::System, aUserAgent);
+  nsCOMPtr<Document> doc = mWindow->GetExtantDoc();
+
+  nsresult rv = GetUserAgent(window, doc ? doc->NodePrincipal() : nullptr,
+                             aCallerType == CallerType::System, aUserAgent);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     aRv.Throw(rv);
   }
 }
 
 void Navigator::GetAppCodeName(nsAString& aAppCodeName, ErrorResult& aRv) {
   nsresult rv;
 
@@ -267,26 +269,30 @@ void Navigator::GetAppCodeName(nsAString
     return;
   }
 
   CopyASCIItoUTF16(appName, aAppCodeName);
 }
 
 void Navigator::GetAppVersion(nsAString& aAppVersion, CallerType aCallerType,
                               ErrorResult& aRv) const {
+  nsCOMPtr<Document> doc = mWindow->GetExtantDoc();
+
   nsresult rv = GetAppVersion(
-      aAppVersion,
+      aAppVersion, doc ? doc->NodePrincipal() : nullptr,
       /* aUsePrefOverriddenValue = */ aCallerType != CallerType::System);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     aRv.Throw(rv);
   }
 }
 
 void Navigator::GetAppName(nsAString& aAppName, CallerType aCallerType) const {
-  AppName(aAppName,
+  nsCOMPtr<Document> doc = mWindow->GetExtantDoc();
+
+  AppName(aAppName, doc ? doc->NodePrincipal() : nullptr,
           /* aUsePrefOverriddenValue = */ aCallerType != CallerType::System);
 }
 
 /**
  * Returns the value of Accept-Languages (HTTP header) as a nsTArray of
  * languages. The value is set in the preference by the user ("Content
  * Languages").
  *
@@ -363,30 +369,32 @@ void Navigator::GetLanguages(nsTArray<ns
   // The returned value is cached by the binding code. The window listen to the
   // accept languages change and will clear the cache when needed. It has to
   // take care of dispatching the DOM event already and the invalidation and the
   // event has to be timed correctly.
 }
 
 void Navigator::GetPlatform(nsAString& aPlatform, CallerType aCallerType,
                             ErrorResult& aRv) const {
+  nsCOMPtr<Document> doc = mWindow->GetExtantDoc();
+
   nsresult rv = GetPlatform(
-      aPlatform,
+      aPlatform, doc ? doc->NodePrincipal() : nullptr,
       /* aUsePrefOverriddenValue = */ aCallerType != CallerType::System);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     aRv.Throw(rv);
   }
 }
 
 void Navigator::GetOscpu(nsAString& aOSCPU, CallerType aCallerType,
                          ErrorResult& aRv) const {
   if (aCallerType != CallerType::System) {
     // If fingerprinting resistance is on, we will spoof this value. See
     // nsRFPService.h for details about spoofed values.
-    if (nsContentUtils::ShouldResistFingerprinting()) {
+    if (nsContentUtils::ShouldResistFingerprinting(GetDocShell())) {
       aOSCPU.AssignLiteral(SPOOFED_OSCPU);
       return;
     }
 
     nsAutoString override;
     nsresult rv = Preferences::GetString("general.oscpu.override", override);
     if (NS_SUCCEEDED(rv)) {
       aOSCPU = override;
@@ -512,17 +520,17 @@ bool Navigator::CookieEnabled() {
 
 bool Navigator::OnLine() { return !NS_IsOffline(); }
 
 void Navigator::GetBuildID(nsAString& aBuildID, CallerType aCallerType,
                            ErrorResult& aRv) const {
   if (aCallerType != CallerType::System) {
     // If fingerprinting resistance is on, we will spoof this value. See
     // nsRFPService.h for details about spoofed values.
-    if (nsContentUtils::ShouldResistFingerprinting()) {
+    if (nsContentUtils::ShouldResistFingerprinting(GetDocShell())) {
       aBuildID.AssignLiteral(LEGACY_BUILD_ID);
       return;
     }
 
     nsAutoString override;
     nsresult rv = Preferences::GetString("general.buildID.override", override);
     if (NS_SUCCEEDED(rv)) {
       aBuildID = override;
@@ -779,17 +787,17 @@ bool Navigator::Vibrate(const nsTArray<u
 //*****************************************************************************
 //  Pointer Events interface
 //*****************************************************************************
 
 uint32_t Navigator::MaxTouchPoints(CallerType aCallerType) {
   // The maxTouchPoints is going to reveal the detail of users' hardware. So,
   // we will spoof it into 0 if fingerprinting resistance is on.
   if (aCallerType != CallerType::System &&
-      nsContentUtils::ShouldResistFingerprinting()) {
+      nsContentUtils::ShouldResistFingerprinting(GetDocShell())) {
     return 0;
   }
 
   nsCOMPtr<nsIWidget> widget =
       widget::WidgetUtils::DOMWindowToWidget(mWindow->GetOuterWindow());
 
   NS_ENSURE_TRUE(widget, 0);
   return widget->GetMaxTouchPoints();
@@ -1022,18 +1030,17 @@ BeaconStreamListener::OnStartRequest(nsI
   // release the loadgroup first
   mLoadGroup = nullptr;
 
   aRequest->Cancel(NS_ERROR_NET_INTERRUPT);
   return NS_BINDING_ABORTED;
 }
 
 NS_IMETHODIMP
-BeaconStreamListener::OnStopRequest(nsIRequest* aRequest,
-                                    nsresult aStatus) {
+BeaconStreamListener::OnStopRequest(nsIRequest* aRequest, nsresult aStatus) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 BeaconStreamListener::OnDataAvailable(nsIRequest* aRequest,
                                       nsIInputStream* inStr,
                                       uint64_t sourceOffset, uint32_t count) {
   MOZ_ASSERT(false);
@@ -1519,23 +1526,24 @@ bool Navigator::HasUserMediaSupport(JSCo
 /* static */
 already_AddRefed<nsPIDOMWindowInner> Navigator::GetWindowFromGlobal(
     JSObject* aGlobal) {
   nsCOMPtr<nsPIDOMWindowInner> win = xpc::WindowOrNull(aGlobal);
   return win.forget();
 }
 
 nsresult Navigator::GetPlatform(nsAString& aPlatform,
+                                nsIPrincipal* aCallerPrincipal,
                                 bool aUsePrefOverriddenValue) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (aUsePrefOverriddenValue) {
     // If fingerprinting resistance is on, we will spoof this value. See
     // nsRFPService.h for details about spoofed values.
-    if (nsContentUtils::ShouldResistFingerprinting()) {
+    if (nsContentUtils::ShouldResistFingerprinting(aCallerPrincipal)) {
       aPlatform.AssignLiteral(SPOOFED_PLATFORM);
       return NS_OK;
     }
     nsAutoString override;
     nsresult rv =
         mozilla::Preferences::GetString("general.platform.override", override);
 
     if (NS_SUCCEEDED(rv)) {
@@ -1569,23 +1577,24 @@ nsresult Navigator::GetPlatform(nsAStrin
   CopyASCIItoUTF16(plat, aPlatform);
 #endif
 
   return rv;
 }
 
 /* static */
 nsresult Navigator::GetAppVersion(nsAString& aAppVersion,
+                                  nsIPrincipal* aCallerPrincipal,
                                   bool aUsePrefOverriddenValue) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (aUsePrefOverriddenValue) {
     // If fingerprinting resistance is on, we will spoof this value. See
     // nsRFPService.h for details about spoofed values.
-    if (nsContentUtils::ShouldResistFingerprinting()) {
+    if (nsContentUtils::ShouldResistFingerprinting(aCallerPrincipal)) {
       aAppVersion.AssignLiteral(SPOOFED_APPVERSION);
       return NS_OK;
     }
     nsAutoString override;
     nsresult rv = mozilla::Preferences::GetString("general.appversion.override",
                                                   override);
 
     if (NS_SUCCEEDED(rv)) {
@@ -1612,23 +1621,24 @@ nsresult Navigator::GetAppVersion(nsAStr
 
   AppendASCIItoUTF16(str, aAppVersion);
   aAppVersion.Append(char16_t(')'));
 
   return rv;
 }
 
 /* static */
-void Navigator::AppName(nsAString& aAppName, bool aUsePrefOverriddenValue) {
+void Navigator::AppName(nsAString& aAppName, nsIPrincipal* aCallerPrincipal,
+                        bool aUsePrefOverriddenValue) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (aUsePrefOverriddenValue) {
     // If fingerprinting resistance is on, we will spoof this value. See
     // nsRFPService.h for details about spoofed values.
-    if (nsContentUtils::ShouldResistFingerprinting()) {
+    if (nsContentUtils::ShouldResistFingerprinting(aCallerPrincipal)) {
       aAppName.AssignLiteral(SPOOFED_APPNAME);
       return;
     }
 
     nsAutoString override;
     nsresult rv =
         mozilla::Preferences::GetString("general.appname.override", override);
 
@@ -1641,36 +1651,39 @@ void Navigator::AppName(nsAString& aAppN
   aAppName.AssignLiteral("Netscape");
 }
 
 void Navigator::ClearUserAgentCache() {
   Navigator_Binding::ClearCachedUserAgentValue(this);
 }
 
 nsresult Navigator::GetUserAgent(nsPIDOMWindowInner* aWindow,
+                                 nsIPrincipal* aCallerPrincipal,
                                  bool aIsCallerChrome, nsAString& aUserAgent) {
   MOZ_ASSERT(NS_IsMainThread());
 
   // We will skip the override and pass to httpHandler to get spoofed userAgent
   // when 'privacy.resistFingerprinting' is true.
-  if (!aIsCallerChrome && !nsContentUtils::ShouldResistFingerprinting()) {
+  if (!aIsCallerChrome &&
+      !nsContentUtils::ShouldResistFingerprinting(aCallerPrincipal)) {
     nsAutoString override;
     nsresult rv =
         mozilla::Preferences::GetString("general.useragent.override", override);
 
     if (NS_SUCCEEDED(rv)) {
       aUserAgent = override;
       return NS_OK;
     }
   }
 
   // When the caller is content and 'privacy.resistFingerprinting' is true,
   // return a spoofed userAgent which reveals the platform but not the
   // specific OS version, etc.
-  if (!aIsCallerChrome && nsContentUtils::ShouldResistFingerprinting()) {
+  if (!aIsCallerChrome &&
+      nsContentUtils::ShouldResistFingerprinting(aCallerPrincipal)) {
     nsAutoCString spoofedUA;
     nsRFPService::GetSpoofedUserAgent(spoofedUA, false);
     CopyASCIItoUTF16(spoofedUA, aUserAgent);
     return NS_OK;
   }
 
   nsresult rv;
   nsCOMPtr<nsIHttpProtocolHandler> service(
@@ -1686,17 +1699,18 @@ nsresult Navigator::GetUserAgent(nsPIDOM
   }
 
   CopyASCIItoUTF16(ua, aUserAgent);
 
   // When the caller is content, we will always return spoofed userAgent and
   // ignore the User-Agent header from the document channel when
   // 'privacy.resistFingerprinting' is true.
   if (!aWindow ||
-      (nsContentUtils::ShouldResistFingerprinting() && !aIsCallerChrome)) {
+      (nsContentUtils::ShouldResistFingerprinting(aCallerPrincipal) &&
+       !aIsCallerChrome)) {
     return NS_OK;
   }
 
   // Copy the User-Agent header from the document channel which has already been
   // subject to UA overrides.
   nsCOMPtr<Document> doc = aWindow->GetExtantDoc();
   if (!doc) {
     return NS_OK;
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -121,25 +121,29 @@ class Navigator final : public nsISuppor
                               const nsAString& aTitle, ErrorResult& aRv);
   nsMimeTypeArray* GetMimeTypes(ErrorResult& aRv);
   nsPluginArray* GetPlugins(ErrorResult& aRv);
   Permissions* GetPermissions(ErrorResult& aRv);
   void GetDoNotTrack(nsAString& aResult);
   Geolocation* GetGeolocation(ErrorResult& aRv);
   Promise* GetBattery(ErrorResult& aRv);
 
-  static void AppName(nsAString& aAppName, bool aUsePrefOverriddenValue);
+  static void AppName(nsAString& aAppName, nsIPrincipal* aCallerPrincipal,
+                      bool aUsePrefOverriddenValue);
 
   static nsresult GetPlatform(nsAString& aPlatform,
+                              nsIPrincipal* aCallerPrincipal,
                               bool aUsePrefOverriddenValue);
 
   static nsresult GetAppVersion(nsAString& aAppVersion,
+                                nsIPrincipal* aCallerPrincipal,
                                 bool aUsePrefOverriddenValue);
 
   static nsresult GetUserAgent(nsPIDOMWindowInner* aWindow,
+                               nsIPrincipal* aCallerPrincipal,
                                bool aIsCallerChrome, nsAString& aUserAgent);
 
   // Clears the user agent cache by calling:
   // Navigator_Binding::ClearCachedUserAgentValue(this);
   void ClearUserAgentCache();
 
   bool Vibrate(uint32_t aDuration);
   bool Vibrate(const nsTArray<uint32_t>& aDuration);
@@ -233,16 +237,20 @@ class Navigator final : public nsISuppor
 
   // This enum helps SendBeaconInternal to apply different behaviors to body
   // types.
   enum BeaconType { eBeaconTypeBlob, eBeaconTypeArrayBuffer, eBeaconTypeOther };
 
   bool SendBeaconInternal(const nsAString& aUrl, BodyExtractorBase* aBody,
                           BeaconType aType, ErrorResult& aRv);
 
+  nsIDocShell* GetDocShell() const {
+    return mWindow ? mWindow->GetDocShell() : nullptr;
+  }
+
   RefPtr<nsMimeTypeArray> mMimeTypes;
   RefPtr<nsPluginArray> mPlugins;
   RefPtr<Permissions> mPermissions;
   RefPtr<Geolocation> mGeolocation;
   RefPtr<battery::BatteryManager> mBatteryManager;
   RefPtr<Promise> mBatteryPromise;
   RefPtr<network::Connection> mConnection;
   RefPtr<CredentialsContainer> mCredentials;
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -2070,16 +2070,25 @@ bool nsContentUtils::ShouldResistFingerp
   if (!aDoc) {
     return false;
   }
   bool isChrome = nsContentUtils::IsChromeDoc(aDoc);
   return !isChrome && ShouldResistFingerprinting();
 }
 
 /* static */
+bool nsContentUtils::ShouldResistFingerprinting(nsIPrincipal* aPrincipal) {
+  if (!aPrincipal) {
+    return false;
+  }
+  bool isChrome = nsContentUtils::IsSystemPrincipal(aPrincipal);
+  return !isChrome && ShouldResistFingerprinting();
+}
+
+/* static */
 bool nsContentUtils::UseStandinsForNativeColors() {
   return ShouldResistFingerprinting() ||
          StaticPrefs::ui_use_standins_for_native_colors();
 }
 
 /* static */
 void nsContentUtils::CalcRoundedWindowSizeForResistingFingerprinting(
     int32_t aChromeWidth, int32_t aChromeHeight, int32_t aScreenWidth,
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -299,16 +299,17 @@ class nsContentUtils {
   static bool LookupBindingMember(
       JSContext* aCx, nsIContent* aContent, JS::Handle<jsid> aId,
       JS::MutableHandle<JS::PropertyDescriptor> aDesc);
 
   // Check whether we should avoid leaking distinguishing information to JS/CSS.
   // This function can be called both in the main thread and worker threads.
   static bool ShouldResistFingerprinting();
   static bool ShouldResistFingerprinting(nsIDocShell* aDocShell);
+  static bool ShouldResistFingerprinting(nsIPrincipal* aPrincipal);
   static bool ShouldResistFingerprinting(const Document* aDoc);
 
   // Prevent system colors from being exposed to CSS or canvas.
   static bool UseStandinsForNativeColors();
 
   // A helper function to calculate the rounded window size for fingerprinting
   // resistance. The rounded size is based on the chrome UI size and available
   // screen size. If the inputWidth/Height is greater than the available content
--- a/dom/canvas/CanvasUtils.cpp
+++ b/dom/canvas/CanvasUtils.cpp
@@ -44,17 +44,17 @@
 using namespace mozilla::gfx;
 
 namespace mozilla {
 namespace CanvasUtils {
 
 bool IsImageExtractionAllowed(Document* aDocument, JSContext* aCx,
                               nsIPrincipal& aPrincipal) {
   // Do the rest of the checks only if privacy.resistFingerprinting is on.
-  if (!nsContentUtils::ShouldResistFingerprinting()) {
+  if (!nsContentUtils::ShouldResistFingerprinting(aDocument)) {
     return true;
   }
 
   // Don't proceed if we don't have a document or JavaScript context.
   if (!aDocument || !aCx) {
     return false;
   }
 
--- a/dom/canvas/OffscreenCanvas.cpp
+++ b/dom/canvas/OffscreenCanvas.cpp
@@ -250,17 +250,19 @@ already_AddRefed<Promise> OffscreenCanva
   };
 
   RefPtr<EncodeCompleteCallback> callback = new EncodeCallback(global, promise);
 
   // TODO: Can we obtain the context and document here somehow
   // so that we can decide when usePlaceholder should be true/false?
   // See https://trac.torproject.org/18599
   // For now, we always return a placeholder if fingerprinting resistance is on.
-  bool usePlaceholder = nsContentUtils::ShouldResistFingerprinting();
+  dom::WorkerPrivate* workerPrivate = dom::GetCurrentThreadWorkerPrivate();
+  bool usePlaceholder =
+      nsContentUtils::ShouldResistFingerprinting(workerPrivate->GetPrincipal());
   CanvasRenderingContextHelper::ToBlob(aCx, global, callback, aType, aParams,
                                        usePlaceholder, aRv);
 
   return promise.forget();
 }
 
 already_AddRefed<gfx::SourceSurface> OffscreenCanvas::GetSurfaceSnapshot(
     gfxAlphaType* const aOutAlphaType) {
--- a/dom/canvas/WebGLContextExtensions.cpp
+++ b/dom/canvas/WebGLContextExtensions.cpp
@@ -102,16 +102,25 @@ bool WebGLContext::IsExtensionSupported(
   }
 
   return IsExtensionSupported(ext);
 }
 
 bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const {
   if (mDisableExtensions) return false;
 
+  bool shouldResistFingerprinting =
+      mCanvasElement ?
+                     // If we're constructed from a canvas element
+          nsContentUtils::ShouldResistFingerprinting(GetOwnerDoc())
+                     :
+                     // If we're constructed from an offscreen canvas
+          nsContentUtils::ShouldResistFingerprinting(
+              mOffscreenCanvas->GetOwnerGlobal()->PrincipalOrNull());
+
   switch (ext) {
     // In alphabetical order
     // ANGLE_
     case WebGLExtensionID::ANGLE_instanced_arrays:
       return WebGLExtensionInstancedArrays::IsSupported(this);
 
     // EXT_
     case WebGLExtensionID::EXT_blend_minmax:
@@ -196,20 +205,20 @@ bool WebGLContext::IsExtensionSupported(
     case WebGLExtensionID::WEBGL_compressed_texture_s3tc:
       return WebGLExtensionCompressedTextureS3TC::IsSupported(this);
 
     case WebGLExtensionID::WEBGL_compressed_texture_s3tc_srgb:
       return WebGLExtensionCompressedTextureS3TC_SRGB::IsSupported(this);
 
     case WebGLExtensionID::WEBGL_debug_renderer_info:
       return Preferences::GetBool("webgl.enable-debug-renderer-info", false) &&
-             !nsContentUtils::ShouldResistFingerprinting();
+             !shouldResistFingerprinting;
 
     case WebGLExtensionID::WEBGL_debug_shaders:
-      return !nsContentUtils::ShouldResistFingerprinting();
+      return !shouldResistFingerprinting;
 
     case WebGLExtensionID::WEBGL_depth_texture:
       return WebGLExtensionDepthTexture::IsSupported(this);
 
     case WebGLExtensionID::WEBGL_draw_buffers:
       return WebGLExtensionDrawBuffers::IsSupported(this);
 
     case WebGLExtensionID::WEBGL_lose_context:
--- a/dom/canvas/WebGLContextValidate.cpp
+++ b/dom/canvas/WebGLContextValidate.cpp
@@ -466,16 +466,24 @@ bool WebGLContext::InitAndValidateGL(Fai
   gl->fGetFloatv(LOCAL_GL_ALIASED_LINE_WIDTH_RANGE, mGLAliasedLineWidthRange);
 
   const GLenum driverPName = gl->IsCoreProfile()
                                  ? LOCAL_GL_POINT_SIZE_RANGE
                                  : LOCAL_GL_ALIASED_POINT_SIZE_RANGE;
   gl->fGetFloatv(driverPName, mGLAliasedPointSizeRange);
 
   ////////////////
+  bool shouldResistFingerprinting =
+      mCanvasElement ?
+                     // If we're constructed from a canvas element
+          nsContentUtils::ShouldResistFingerprinting(GetOwnerDoc())
+                     :
+                     // If we're constructed from an offscreen canvas
+          nsContentUtils::ShouldResistFingerprinting(
+              mOffscreenCanvas->GetOwnerGlobal()->PrincipalOrNull());
 
   if (gfxPrefs::WebGLMinCapabilityMode()) {
     bool ok = true;
 
     ok &= RestrictCap(&mGLMaxVertexTextureImageUnits,
                       kMinMaxVertexTextureImageUnits);
     ok &= RestrictCap(&mGLMaxFragmentTextureImageUnits,
                       kMinMaxFragmentTextureImageUnits);
@@ -500,17 +508,17 @@ bool WebGLContext::InitAndValidateGL(Fai
     ok &= RestrictCap(&mGLMaxRenderbufferSize, kMinMaxRenderbufferSize);
 
     if (!ok) {
       GenerateWarning("Unable to restrict WebGL limits to minimums.");
       return false;
     }
 
     mDisableFragHighP = true;
-  } else if (nsContentUtils::ShouldResistFingerprinting()) {
+  } else if (shouldResistFingerprinting) {
     bool ok = true;
 
     ok &= RestrictCap(&mGLMaxTextureSize, kCommonMaxTextureSize);
     ok &= RestrictCap(&mGLMaxCubeMapTextureSize, kCommonMaxCubeMapTextureSize);
     ok &= RestrictCap(&mGLMaxRenderbufferSize, kCommonMaxRenderbufferSize);
 
     ok &= RestrictCap(&mGLMaxVertexTextureImageUnits,
                       kCommonMaxVertexTextureImageUnits);
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -1251,23 +1251,24 @@ bool RuntimeService::RegisterWorker(Work
   if (parent) {
     if (!parent->AddChildWorker(aWorkerPrivate)) {
       UnregisterWorker(aWorkerPrivate);
       return false;
     }
   } else {
     if (!mNavigatorPropertiesLoaded) {
       Navigator::AppName(mNavigatorProperties.mAppName,
+                         aWorkerPrivate->GetPrincipal(),
                          false /* aUsePrefOverriddenValue */);
-      if (NS_FAILED(
-              Navigator::GetAppVersion(mNavigatorProperties.mAppVersion,
-                                       false /* aUsePrefOverriddenValue */)) ||
-          NS_FAILED(
-              Navigator::GetPlatform(mNavigatorProperties.mPlatform,
-                                     false /* aUsePrefOverriddenValue */))) {
+      if (NS_FAILED(Navigator::GetAppVersion(
+              mNavigatorProperties.mAppVersion, aWorkerPrivate->GetPrincipal(),
+              false /* aUsePrefOverriddenValue */)) ||
+          NS_FAILED(Navigator::GetPlatform(
+              mNavigatorProperties.mPlatform, aWorkerPrivate->GetPrincipal(),
+              false /* aUsePrefOverriddenValue */))) {
         UnregisterWorker(aWorkerPrivate);
         return false;
       }
 
       // The navigator overridden properties should have already been read.
 
       Navigator::GetAcceptLanguages(mNavigatorProperties.mLanguages);
       mNavigatorPropertiesLoaded = true;
--- a/dom/workers/WorkerNavigator.cpp
+++ b/dom/workers/WorkerNavigator.cpp
@@ -136,17 +136,18 @@ class GetUserAgentRunnable final : publi
   }
 
   virtual bool MainThreadRun() override {
     AssertIsOnMainThread();
 
     nsCOMPtr<nsPIDOMWindowInner> window = mWorkerPrivate->GetWindow();
 
     bool isCallerChrome = mWorkerPrivate->UsesSystemPrincipal();
-    nsresult rv = dom::Navigator::GetUserAgent(window, isCallerChrome, mUA);
+    nsresult rv = dom::Navigator::GetUserAgent(
+        window, mWorkerPrivate->GetPrincipal(), isCallerChrome, mUA);
     if (NS_FAILED(rv)) {
       NS_WARNING("Failed to retrieve user-agent from the worker thread.");
     }
 
     return true;
   }
 };
 
--- a/gfx/vr/VRManager.cpp
+++ b/gfx/vr/VRManager.cpp
@@ -241,16 +241,23 @@ void VRManager::TaskTimerCallback(nsITim
   self->RunTasks();
 }
 
 void VRManager::RunTasks() {
   // Will be called once every 1ms when a VR presentation
   // is active or once per vsync when a VR presentation is
   // not active.
 
+  if (!mInitialized) {
+    // We may have been destroyed but still have messages
+    // in the queue from mTaskTimer.  Bail out to avoid
+    // running them.
+    return;
+  }
+
   TimeStamp now = TimeStamp::Now();
   double lastTickMs = mAccumulator100ms;
   double deltaTime = 0.0f;
   if (!mLastTickTime.IsNull()) {
     deltaTime = (now - mLastTickTime).ToMilliseconds();
   }
   mAccumulator100ms += deltaTime;
   mLastTickTime = now;
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -900,16 +900,30 @@ bool nsIFrame::HasDisplayItems() {
 bool nsIFrame::HasDisplayItem(nsDisplayItem* aItem) {
   DisplayItemArray* items = GetProperty(DisplayItems());
   if (!items) {
     return false;
   }
   return items->Contains(aItem);
 }
 
+bool nsIFrame::HasDisplayItem(uint32_t aKey) {
+  DisplayItemArray* items = GetProperty(DisplayItems());
+  if (!items) {
+    return false;
+  }
+
+  for (nsDisplayItem* i : *items) {
+    if (i->GetPerFrameKey() == aKey) {
+      return true;
+    }
+  }
+  return false;
+}
+
 void nsIFrame::RemoveDisplayItemDataForDeletion() {
   // Destroying a WebRenderUserDataTable can cause destruction of other objects
   // which can remove frame properties in their destructor. If we delete a frame
   // property it runs the destructor of the stored object in the middle of
   // updating the frame property table, so if the destruction of that object
   // causes another update to the frame property table it would leave the frame
   // property table in an inconsistent state. So we remove it from the table and
   // then destroy it. (bug 1530657)
@@ -3399,28 +3413,57 @@ void nsIFrame::BuildDisplayListForStacki
   }
 
   aList->AppendToTop(&resultList);
 }
 
 static nsDisplayItem* WrapInWrapList(nsDisplayListBuilder* aBuilder,
                                      nsIFrame* aFrame, nsDisplayList* aList,
                                      const ActiveScrolledRoot* aContainerASR,
-                                     bool aCanSkipWrapList = false) {
+                                     bool aBuiltContainerItem = false) {
   nsDisplayItem* item = aList->GetBottom();
   if (!item) {
     return nullptr;
   }
 
-  if (aCanSkipWrapList) {
-    MOZ_ASSERT(!item->GetAbove());
+  // We need a wrap list if there are multiple items, or if the single
+  // item has a different frame.
+  bool needsWrapList = item->GetAbove() || item->Frame() != aFrame;
+
+  // If we don't need a wrap list, and we're doing a full build, or if
+  // we have an explicit container item that guarantees to wrap all other
+  // items then we can skip.
+  if (!needsWrapList && (!aBuilder->IsPartialUpdate() || aBuiltContainerItem)) {
     aList->RemoveBottom();
     return item;
   }
 
+  // If we're doing a partial build and we didn't need a wrap list
+  // previously then we can try to work from there.
+  if (aBuilder->IsPartialUpdate() &&
+      !aFrame->HasDisplayItem(uint32_t(DisplayItemType::TYPE_WRAP_LIST))) {
+    // If we now need a wrap list, mark this frame as modified so that merging
+    // removes the unwrapped item. We don't need to add to the dirty rect since
+    // not needing a wrap list means that we must have only had a display item
+    // from this frame, which we're already building items for. All new items
+    // will have already been included in the dirty area.
+    if (needsWrapList) {
+      aBuilder->MarkFrameModifiedDuringBuilding(aFrame);
+    } else {
+      aList->RemoveBottom();
+      return item;
+    }
+  }
+
+  // The last case is when we previously had a wrap list, but no longer
+  // need it. Unfortunately we can't differentiate this case from a partial
+  // build where other children exist but we just didn't build them.
+  // TODO:RetainedDisplayListBuilder's merge phase has the full list and
+  // could strip them out.
+
   // Clear clip rect for the construction of the items below. Since we're
   // clipping all their contents, they themselves don't need to be clipped.
   return MakeDisplayItem<nsDisplayWrapList>(aBuilder, aFrame, aList,
                                             aContainerASR, true);
 }
 
 /**
  * Check if a frame should be visited for building display list.
@@ -3724,27 +3767,27 @@ void nsIFrame::BuildDisplayListForChild(
       parent == this ? ourDisp : parent->StyleDisplay();
   if (ApplyOverflowClipping(aBuilder, parent, parentDisp, clipState)) {
     awayFromCommonPath = true;
   }
 
   nsDisplayList list;
   nsDisplayList extraPositionedDescendants;
   const ActiveScrolledRoot* wrapListASR;
-  bool canSkipWrapList = false;
+  bool builtContainerItem = false;
   if (isStackingContext) {
     // True stacking context.
     // For stacking contexts, BuildDisplayListForStackingContext handles
     // clipping and MarkAbsoluteFramesForDisplayList.
     nsDisplayListBuilder::AutoContainerASRTracker contASRTracker(aBuilder);
     child->BuildDisplayListForStackingContext(aBuilder, &list,
-                                              &canSkipWrapList);
+                                              &builtContainerItem);
     wrapListASR = contASRTracker.GetContainerASR();
     if (aBuilder->GetCaretFrame() == child) {
-      canSkipWrapList = false;
+      builtContainerItem = false;
     }
   } else {
     Maybe<nsRect> clipPropClip =
         child->GetClipPropClipRect(disp, effects, child->GetSize());
     if (clipPropClip) {
       aBuilder->IntersectVisibleRect(*clipPropClip);
       aBuilder->IntersectDirtyRect(*clipPropClip);
       clipState.ClipContentDescendants(*clipPropClip +
@@ -3790,17 +3833,17 @@ void nsIFrame::BuildDisplayListForChild(
         child, pseudoStack.BorderBackground(), differentAGR || isPositioned);
 
     aBuilder->AdjustWindowDraggingRegion(child);
     nsDisplayListBuilder::AutoContainerASRTracker contASRTracker(aBuilder);
     aBuilder->Check();
     child->BuildDisplayList(aBuilder, pseudoStack);
     aBuilder->Check();
     if (aBuilder->DisplayCaret(child, pseudoStack.Content())) {
-      canSkipWrapList = false;
+      builtContainerItem = false;
     }
     wrapListASR = contASRTracker.GetContainerASR();
 
     list.AppendToTop(pseudoStack.BorderBackground());
     list.AppendToTop(pseudoStack.BlockBorderBackgrounds());
     list.AppendToTop(pseudoStack.Floats());
     list.AppendToTop(pseudoStack.Content());
     list.AppendToTop(pseudoStack.Outlines());
@@ -3812,18 +3855,18 @@ void nsIFrame::BuildDisplayListForChild(
 
   buildingForChild.RestoreBuildingInvisibleItemsValue();
 
   if (isPositioned || isStackingContext ||
       (aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT)) {
     // Genuine stacking contexts, and positioned pseudo-stacking-contexts,
     // go in this level.
     if (!list.IsEmpty()) {
-      nsDisplayItem* item =
-          WrapInWrapList(aBuilder, child, &list, wrapListASR, canSkipWrapList);
+      nsDisplayItem* item = WrapInWrapList(aBuilder, child, &list, wrapListASR,
+                                           builtContainerItem);
       if (isSVG) {
         aLists.Content()->AppendToTop(item);
       } else {
         aLists.PositionedDescendants()->AppendToTop(item);
       }
     }
   } else if (!isSVG && disp->IsFloating(child)) {
     if (!list.IsEmpty()) {
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -4132,16 +4132,17 @@ class nsIFrame : public nsQueryFrame {
     return mDisplayItemData;
   }
 
   void AddDisplayItem(nsDisplayItem* aItem);
   bool RemoveDisplayItem(nsDisplayItem* aItem);
   void RemoveDisplayItemDataForDeletion();
   bool HasDisplayItems();
   bool HasDisplayItem(nsDisplayItem* aItem);
+  bool HasDisplayItem(uint32_t aKey);
 
   bool ForceDescendIntoIfVisible() const { return mForceDescendIntoIfVisible; }
   void SetForceDescendIntoIfVisible(bool aForce) {
     mForceDescendIntoIfVisible = aForce;
   }
 
   bool BuiltDisplayList() { return mBuiltDisplayList; }
   void SetBuiltDisplayList(bool aBuilt) { mBuiltDisplayList = aBuilt; }
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -2984,19 +2984,17 @@ class nsDisplayList {
    */
   nsDisplayList()
       : mLength(0), mIsOpaque(false), mForceTransparentSurface(false) {
     mTop = &mSentinel;
     mSentinel.mAbove = nullptr;
   }
 
   virtual ~nsDisplayList() {
-    if (mSentinel.mAbove) {
-      NS_WARNING("Nonempty list left over?");
-    }
+    MOZ_RELEASE_ASSERT(!mSentinel.mAbove, "Nonempty list left over?");
   }
 
   nsDisplayList(nsDisplayList&& aOther) {
     mIsOpaque = aOther.mIsOpaque;
     mForceTransparentSurface = aOther.mForceTransparentSurface;
 
     if (aOther.mSentinel.mAbove) {
       AppendToTop(&aOther);
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -575,16 +575,20 @@ pref("media.mediadrm-widevinecdm.visible
 // Switch block autoplay logic to v2.
 pref("media.autoplay.enabled.user-gestures-needed", true);
 // Set Fennec to block autoplay by default.
 pref("media.autoplay.default", 1); // 0=Allowed, 1=Blocked
 
 // Enable WebSpeech speech synthesis
 pref("media.webspeech.synth.enabled", true);
 
+// OpenH264 is visible in about:plugins, and enabled, by default.
+pref("media.gmp-gmpopenh264.visible", true);
+pref("media.gmp-gmpopenh264.enabled", true);
+
 // optimize images memory usage
 pref("image.downscale-during-decode.enabled", true);
 
 // The download protection UI is not implemented yet (bug 1239094).
 pref("browser.safebrowsing.downloads.enabled", false);
 
 // The application reputation lists are not available on Android.
 pref("urlclassifier.downloadAllowTable", "");
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -525,21 +525,28 @@ VARCACHE_PREF(
    dom_storage_access_auto_grants_delayed,
   bool, true
 )
 
 //---------------------------------------------------------------------------
 // Extension prefs
 //---------------------------------------------------------------------------
 
+#ifdef ANDROID
+// Private browsing opt-in is only supported on Firefox desktop.
+# define PREF_VALUE true
+#else
+# define PREF_VALUE false
+#endif
 VARCACHE_PREF(
   "extensions.allowPrivateBrowsingByDefault",
    extensions_allowPrivateBrowsingByDefault,
-  bool, true
+  bool, PREF_VALUE
 )
+#undef PREF_VALUE
 
 //---------------------------------------------------------------------------
 // Full-screen prefs
 //---------------------------------------------------------------------------
 
 VARCACHE_PREF(
   "full-screen-api.unprefix.enabled",
    full_screen_api_unprefix_enabled,
rename from netwerk/url-classifier/UrlClassifierFeatureCryptomining.cpp
rename to netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
--- a/netwerk/url-classifier/UrlClassifierFeatureCryptomining.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=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/. */
 
-#include "UrlClassifierFeatureCryptomining.h"
+#include "UrlClassifierFeatureCryptominingProtection.h"
 
 #include "mozilla/AntiTrackingCommon.h"
 #include "mozilla/net/UrlClassifierCommon.h"
 #include "mozilla/StaticPrefs.h"
 #include "nsContentUtils.h"
 #include "nsNetUtil.h"
 
 namespace mozilla {
@@ -25,62 +25,66 @@ namespace {
   "urlclassifier.features.cryptomining.blacklistHosts"
 #define URLCLASSIFIER_CRYPTOMINING_WHITELIST \
   "urlclassifier.features.cryptomining.whitelistTables"
 #define URLCLASSIFIER_CRYPTOMINING_WHITELIST_TEST_ENTRIES \
   "urlclassifier.features.cryptomining.whitelistHosts"
 #define TABLE_CRYPTOMINING_BLACKLIST_PREF "cryptomining-blacklist-pref"
 #define TABLE_CRYPTOMINING_WHITELIST_PREF "cryptomining-whitelist-pref"
 
-StaticRefPtr<UrlClassifierFeatureCryptomining> gFeatureCryptomining;
+StaticRefPtr<UrlClassifierFeatureCryptominingProtection>
+    gFeatureCryptominingProtection;
 
 }  // namespace
 
-UrlClassifierFeatureCryptomining::UrlClassifierFeatureCryptomining()
+UrlClassifierFeatureCryptominingProtection::
+    UrlClassifierFeatureCryptominingProtection()
     : UrlClassifierFeatureBase(
           NS_LITERAL_CSTRING(CRYPTOMINING_FEATURE_NAME),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_BLACKLIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_WHITELIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_BLACKLIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_WHITELIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(TABLE_CRYPTOMINING_BLACKLIST_PREF),
           NS_LITERAL_CSTRING(TABLE_CRYPTOMINING_WHITELIST_PREF),
           EmptyCString()) {}
 
-/* static */ const char* UrlClassifierFeatureCryptomining::Name() {
+/* static */ const char* UrlClassifierFeatureCryptominingProtection::Name() {
   return CRYPTOMINING_FEATURE_NAME;
 }
 
 /* static */
-void UrlClassifierFeatureCryptomining::MaybeInitialize() {
-  UC_LOG(("UrlClassifierFeatureCryptomining: MaybeInitialize"));
+void UrlClassifierFeatureCryptominingProtection::MaybeInitialize() {
+  UC_LOG(("UrlClassifierFeatureCryptominingProtection: MaybeInitialize"));
 
-  if (!gFeatureCryptomining) {
-    gFeatureCryptomining = new UrlClassifierFeatureCryptomining();
-    gFeatureCryptomining->InitializePreferences();
+  if (!gFeatureCryptominingProtection) {
+    gFeatureCryptominingProtection =
+        new UrlClassifierFeatureCryptominingProtection();
+    gFeatureCryptominingProtection->InitializePreferences();
   }
 }
 
 /* static */
-void UrlClassifierFeatureCryptomining::MaybeShutdown() {
-  UC_LOG(("UrlClassifierFeatureCryptomining: MaybeShutdown"));
+void UrlClassifierFeatureCryptominingProtection::MaybeShutdown() {
+  UC_LOG(("UrlClassifierFeatureCryptominingProtection: MaybeShutdown"));
 
-  if (gFeatureCryptomining) {
-    gFeatureCryptomining->ShutdownPreferences();
-    gFeatureCryptomining = nullptr;
+  if (gFeatureCryptominingProtection) {
+    gFeatureCryptominingProtection->ShutdownPreferences();
+    gFeatureCryptominingProtection = nullptr;
   }
 }
 
 /* static */
-already_AddRefed<UrlClassifierFeatureCryptomining>
-UrlClassifierFeatureCryptomining::MaybeCreate(nsIChannel* aChannel) {
+already_AddRefed<UrlClassifierFeatureCryptominingProtection>
+UrlClassifierFeatureCryptominingProtection::MaybeCreate(nsIChannel* aChannel) {
   MOZ_ASSERT(aChannel);
 
-  UC_LOG(("UrlClassifierFeatureCryptomining: MaybeCreate for channel %p",
-          aChannel));
+  UC_LOG(
+      ("UrlClassifierFeatureCryptominingProtection: MaybeCreate for channel %p",
+       aChannel));
 
   if (!StaticPrefs::privacy_trackingprotection_cryptomining_enabled()) {
     return nullptr;
   }
 
   nsCOMPtr<nsIURI> chanURI;
   nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
   if (NS_WARN_IF(NS_FAILED(rv))) {
@@ -90,54 +94,57 @@ UrlClassifierFeatureCryptomining::MaybeC
   bool isThirdParty =
       nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
   if (!isThirdParty) {
     if (UC_LOG_ENABLED()) {
       nsCString spec = chanURI->GetSpecOrDefault();
       spec.Truncate(
           std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
       UC_LOG(
-          ("UrlClassifierFeatureCryptomining: Skipping cryptomining checks "
+          ("UrlClassifierFeatureCryptominingProtection: Skipping cryptomining "
+           "checks "
            "for first party or top-level load channel[%p] "
            "with uri %s",
            aChannel, spec.get()));
     }
 
     return nullptr;
   }
 
   if (!UrlClassifierCommon::ShouldEnableClassifier(aChannel)) {
     return nullptr;
   }
 
   MaybeInitialize();
-  MOZ_ASSERT(gFeatureCryptomining);
+  MOZ_ASSERT(gFeatureCryptominingProtection);
 
-  RefPtr<UrlClassifierFeatureCryptomining> self = gFeatureCryptomining;
+  RefPtr<UrlClassifierFeatureCryptominingProtection> self =
+      gFeatureCryptominingProtection;
   return self.forget();
 }
 
 /* static */
 already_AddRefed<nsIUrlClassifierFeature>
-UrlClassifierFeatureCryptomining::GetIfNameMatches(const nsACString& aName) {
+UrlClassifierFeatureCryptominingProtection::GetIfNameMatches(
+    const nsACString& aName) {
   if (!aName.EqualsLiteral(CRYPTOMINING_FEATURE_NAME)) {
     return nullptr;
   }
 
   MaybeInitialize();
-  MOZ_ASSERT(gFeatureCryptomining);
+  MOZ_ASSERT(gFeatureCryptominingProtection);
 
-  RefPtr<UrlClassifierFeatureCryptomining> self = gFeatureCryptomining;
+  RefPtr<UrlClassifierFeatureCryptominingProtection> self =
+      gFeatureCryptominingProtection;
   return self.forget();
 }
 
 NS_IMETHODIMP
-UrlClassifierFeatureCryptomining::ProcessChannel(nsIChannel* aChannel,
-                                                 const nsACString& aList,
-                                                 bool* aShouldContinue) {
+UrlClassifierFeatureCryptominingProtection::ProcessChannel(
+    nsIChannel* aChannel, const nsACString& aList, bool* aShouldContinue) {
   NS_ENSURE_ARG_POINTER(aChannel);
   NS_ENSURE_ARG_POINTER(aShouldContinue);
 
   bool isAllowListed =
       IsAllowListed(aChannel, AntiTrackingCommon::eCryptomining);
 
   // This is a blocking feature.
   *aShouldContinue = isAllowListed;
@@ -151,34 +158,35 @@ UrlClassifierFeatureCryptomining::Proces
     UrlClassifierCommon::NotifyChannelClassifierProtectionDisabled(
         aChannel, nsIWebProgressListener::STATE_LOADED_CRYPTOMINING_CONTENT);
   } else {
     UrlClassifierCommon::SetBlockedContent(aChannel, NS_ERROR_CRYPTOMINING_URI,
                                            aList, EmptyCString(),
                                            EmptyCString());
 
     UC_LOG(
-        ("UrlClassifierFeatureCryptomining::ProcessChannel, cancelling "
+        ("UrlClassifierFeatureCryptominingProtection::ProcessChannel, "
+         "cancelling "
          "channel[%p]",
          aChannel));
     nsCOMPtr<nsIHttpChannelInternal> httpChannel = do_QueryInterface(aChannel);
 
     if (httpChannel) {
       Unused << httpChannel->CancelByChannelClassifier(
           NS_ERROR_CRYPTOMINING_URI);
     } else {
       Unused << aChannel->Cancel(NS_ERROR_CRYPTOMINING_URI);
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-UrlClassifierFeatureCryptomining::GetURIByListType(
+UrlClassifierFeatureCryptominingProtection::GetURIByListType(
     nsIChannel* aChannel, nsIUrlClassifierFeature::listType aListType,
     nsIURI** aURI) {
   NS_ENSURE_ARG_POINTER(aChannel);
   NS_ENSURE_ARG_POINTER(aURI);
 
   if (aListType == nsIUrlClassifierFeature::blacklist) {
     return aChannel->GetURI(aURI);
   }
rename from netwerk/url-classifier/UrlClassifierFeatureCryptomining.h
rename to netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.h
--- a/netwerk/url-classifier/UrlClassifierFeatureCryptomining.h
+++ b/netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.h
@@ -1,45 +1,46 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=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/. */
 
-#ifndef mozilla_net_UrlClassifierFeatureCryptomining_h
-#define mozilla_net_UrlClassifierFeatureCryptomining_h
+#ifndef mozilla_net_UrlClassifierFeatureCryptominingProtection_h
+#define mozilla_net_UrlClassifierFeatureCryptominingProtection_h
 
 #include "UrlClassifierFeatureBase.h"
 
 class nsIChannel;
 
 namespace mozilla {
 namespace net {
 
-class UrlClassifierFeatureCryptomining final : public UrlClassifierFeatureBase {
+class UrlClassifierFeatureCryptominingProtection final
+    : public UrlClassifierFeatureBase {
  public:
   static const char* Name();
 
   static void MaybeShutdown();
 
-  static already_AddRefed<UrlClassifierFeatureCryptomining> MaybeCreate(
-      nsIChannel* aChannel);
+  static already_AddRefed<UrlClassifierFeatureCryptominingProtection>
+  MaybeCreate(nsIChannel* aChannel);
 
   static already_AddRefed<nsIUrlClassifierFeature> GetIfNameMatches(
       const nsACString& aName);
 
   NS_IMETHOD ProcessChannel(nsIChannel* aChannel, const nsACString& aList,
                             bool* aShouldContinue) override;
 
   NS_IMETHOD GetURIByListType(nsIChannel* aChannel,
                               nsIUrlClassifierFeature::listType aListType,
                               nsIURI** aURI) override;
 
  private:
-  UrlClassifierFeatureCryptomining();
+  UrlClassifierFeatureCryptominingProtection();
 
   static void MaybeInitialize();
 };
 
 }  // namespace net
 }  // namespace mozilla
 
-#endif  // mozilla_net_UrlClassifierFeatureCryptomining_h
+#endif  // mozilla_net_UrlClassifierFeatureCryptominingProtection_h
--- a/netwerk/url-classifier/UrlClassifierFeatureFactory.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureFactory.cpp
@@ -2,18 +2,18 @@
 /* vim: set ts=8 sts=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/. */
 
 #include "mozilla/net/UrlClassifierFeatureFactory.h"
 
 // List of Features
-#include "UrlClassifierFeatureCryptomining.h"
-#include "UrlClassifierFeatureFingerprinting.h"
+#include "UrlClassifierFeatureCryptominingProtection.h"
+#include "UrlClassifierFeatureFingerprintingProtection.h"
 #include "UrlClassifierFeatureFlash.h"
 #include "UrlClassifierFeatureLoginReputation.h"
 #include "UrlClassifierFeaturePhishingProtection.h"
 #include "UrlClassifierFeatureTrackingProtection.h"
 #include "UrlClassifierFeatureTrackingAnnotation.h"
 #include "UrlClassifierFeatureCustomTables.h"
 
 #include "nsAppRunner.h"
@@ -23,18 +23,18 @@ namespace net {
 
 /* static */
 void UrlClassifierFeatureFactory::Shutdown() {
   // We want to expose Features only in the parent process.
   if (!XRE_IsParentProcess()) {
     return;
   }
 
-  UrlClassifierFeatureCryptomining::MaybeShutdown();
-  UrlClassifierFeatureFingerprinting::MaybeShutdown();
+  UrlClassifierFeatureCryptominingProtection::MaybeShutdown();
+  UrlClassifierFeatureFingerprintingProtection::MaybeShutdown();
   UrlClassifierFeatureFlash::MaybeShutdown();
   UrlClassifierFeatureLoginReputation::MaybeShutdown();
   UrlClassifierFeaturePhishingProtection::MaybeShutdown();
   UrlClassifierFeatureTrackingAnnotation::MaybeShutdown();
   UrlClassifierFeatureTrackingProtection::MaybeShutdown();
 }
 
 /* static */
@@ -46,24 +46,24 @@ void UrlClassifierFeatureFactory::GetFea
 
   nsCOMPtr<nsIUrlClassifierFeature> feature;
 
   // Note that the order of the features is extremely important! When more than
   // 1 feature classifies the channel, we call ::ProcessChannel() following this
   // feature order, and this could produce different results with a different
   // feature ordering.
 
-  // Cryptomining
-  feature = UrlClassifierFeatureCryptomining::MaybeCreate(aChannel);
+  // Cryptomining Protection
+  feature = UrlClassifierFeatureCryptominingProtection::MaybeCreate(aChannel);
   if (feature) {
     aFeatures.AppendElement(feature);
   }
 
-  // Fingerprinting
-  feature = UrlClassifierFeatureFingerprinting::MaybeCreate(aChannel);
+  // Fingerprinting Protection
+  feature = UrlClassifierFeatureFingerprintingProtection::MaybeCreate(aChannel);
   if (feature) {
     aFeatures.AppendElement(feature);
   }
 
   // Tracking Protection
   feature = UrlClassifierFeatureTrackingProtection::MaybeCreate(aChannel);
   if (feature) {
     aFeatures.AppendElement(feature);
@@ -97,24 +97,25 @@ UrlClassifierFeatureFactory::GetFeatureL
 already_AddRefed<nsIUrlClassifierFeature>
 UrlClassifierFeatureFactory::GetFeatureByName(const nsACString& aName) {
   if (!XRE_IsParentProcess()) {
     return nullptr;
   }
 
   nsCOMPtr<nsIUrlClassifierFeature> feature;
 
-  // Cryptomining
-  feature = UrlClassifierFeatureCryptomining::GetIfNameMatches(aName);
+  // Cryptomining Protection
+  feature = UrlClassifierFeatureCryptominingProtection::GetIfNameMatches(aName);
   if (feature) {
     return feature.forget();
   }
 
-  // Fingerprinting
-  feature = UrlClassifierFeatureFingerprinting::GetIfNameMatches(aName);
+  // Fingerprinting Protection
+  feature =
+      UrlClassifierFeatureFingerprintingProtection::GetIfNameMatches(aName);
   if (feature) {
     return feature.forget();
   }
 
   // Tracking Protection
   feature = UrlClassifierFeatureTrackingProtection::GetIfNameMatches(aName);
   if (feature) {
     return feature.forget();
@@ -148,25 +149,25 @@ UrlClassifierFeatureFactory::GetFeatureB
 }
 
 /* static */
 void UrlClassifierFeatureFactory::GetFeatureNames(nsTArray<nsCString>& aArray) {
   if (!XRE_IsParentProcess()) {
     return;
   }
 
-  // Cryptomining
+  // Cryptomining Protection
   nsAutoCString name;
-  name.Assign(UrlClassifierFeatureCryptomining::Name());
+  name.Assign(UrlClassifierFeatureCryptominingProtection::Name());
   if (!name.IsEmpty()) {
     aArray.AppendElement(name);
   }
 
-  // Fingerprinting
-  name.Assign(UrlClassifierFeatureFingerprinting::Name());
+  // Fingerprinting Protection
+  name.Assign(UrlClassifierFeatureFingerprintingProtection::Name());
   if (!name.IsEmpty()) {
     aArray.AppendElement(name);
   }
 
   // Tracking Protection
   name.Assign(UrlClassifierFeatureTrackingProtection::Name());
   if (!name.IsEmpty()) {
     aArray.AppendElement(name);
rename from netwerk/url-classifier/UrlClassifierFeatureFingerprinting.cpp
rename to netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
--- a/netwerk/url-classifier/UrlClassifierFeatureFingerprinting.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=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/. */
 
-#include "UrlClassifierFeatureFingerprinting.h"
+#include "UrlClassifierFeatureFingerprintingProtection.h"
 
 #include "mozilla/AntiTrackingCommon.h"
 #include "mozilla/net/UrlClassifierCommon.h"
 #include "mozilla/StaticPrefs.h"
 #include "nsContentUtils.h"
 #include "nsNetUtil.h"
 
 namespace mozilla {
@@ -25,64 +25,70 @@ namespace {
   "urlclassifier.features.fingerprinting.blacklistHosts"
 #define URLCLASSIFIER_FINGERPRINTING_WHITELIST \
   "urlclassifier.features.fingerprinting.whitelistTables"
 #define URLCLASSIFIER_FINGERPRINTING_WHITELIST_TEST_ENTRIES \
   "urlclassifier.features.fingerprinting.whitelistHosts"
 #define TABLE_FINGERPRINTING_BLACKLIST_PREF "fingerprinting-blacklist-pref"
 #define TABLE_FINGERPRINTING_WHITELIST_PREF "fingerprinting-whitelist-pref"
 
-StaticRefPtr<UrlClassifierFeatureFingerprinting> gFeatureFingerprinting;
+StaticRefPtr<UrlClassifierFeatureFingerprintingProtection>
+    gFeatureFingerprintingProtection;
 
 }  // namespace
 
-UrlClassifierFeatureFingerprinting::UrlClassifierFeatureFingerprinting()
+UrlClassifierFeatureFingerprintingProtection::
+    UrlClassifierFeatureFingerprintingProtection()
     : UrlClassifierFeatureBase(
           NS_LITERAL_CSTRING(FINGERPRINTING_FEATURE_NAME),
           NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_BLACKLIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_WHITELIST),
           NS_LITERAL_CSTRING(
               URLCLASSIFIER_FINGERPRINTING_BLACKLIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(
               URLCLASSIFIER_FINGERPRINTING_WHITELIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(TABLE_FINGERPRINTING_BLACKLIST_PREF),
           NS_LITERAL_CSTRING(TABLE_FINGERPRINTING_WHITELIST_PREF),
           EmptyCString()) {}
 
-/* static */ const char* UrlClassifierFeatureFingerprinting::Name() {
+/* static */ const char* UrlClassifierFeatureFingerprintingProtection::Name() {
   return FINGERPRINTING_FEATURE_NAME;
 }
 
 /* static */
-void UrlClassifierFeatureFingerprinting::MaybeInitialize() {
-  UC_LOG(("UrlClassifierFeatureFingerprinting: MaybeInitialize"));
+void UrlClassifierFeatureFingerprintingProtection::MaybeInitialize() {
+  UC_LOG(("UrlClassifierFeatureFingerprintingProtection: MaybeInitialize"));
 
-  if (!gFeatureFingerprinting) {
-    gFeatureFingerprinting = new UrlClassifierFeatureFingerprinting();
-    gFeatureFingerprinting->InitializePreferences();
+  if (!gFeatureFingerprintingProtection) {
+    gFeatureFingerprintingProtection =
+        new UrlClassifierFeatureFingerprintingProtection();
+    gFeatureFingerprintingProtection->InitializePreferences();
   }
 }
 
 /* static */
-void UrlClassifierFeatureFingerprinting::MaybeShutdown() {
-  UC_LOG(("UrlClassifierFeatureFingerprinting: MaybeShutdown"));
+void UrlClassifierFeatureFingerprintingProtection::MaybeShutdown() {
+  UC_LOG(("UrlClassifierFeatureFingerprintingProtection: MaybeShutdown"));
 
-  if (gFeatureFingerprinting) {
-    gFeatureFingerprinting->ShutdownPreferences();
-    gFeatureFingerprinting = nullptr;
+  if (gFeatureFingerprintingProtection) {
+    gFeatureFingerprintingProtection->ShutdownPreferences();
+    gFeatureFingerprintingProtection = nullptr;
   }
 }
 
 /* static */
-already_AddRefed<UrlClassifierFeatureFingerprinting>
-UrlClassifierFeatureFingerprinting::MaybeCreate(nsIChannel* aChannel) {
+already_AddRefed<UrlClassifierFeatureFingerprintingProtection>
+UrlClassifierFeatureFingerprintingProtection::MaybeCreate(
+    nsIChannel* aChannel) {
   MOZ_ASSERT(aChannel);
 
-  UC_LOG(("UrlClassifierFeatureFingerprinting: MaybeCreate for channel %p",
-          aChannel));
+  UC_LOG(
+      ("UrlClassifierFeatureFingerprintingProtection: MaybeCreate for channel "
+       "%p",
+       aChannel));
 
   if (!StaticPrefs::privacy_trackingprotection_fingerprinting_enabled()) {
     return nullptr;
   }
 
   nsCOMPtr<nsIURI> chanURI;
   nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
   if (NS_WARN_IF(NS_FAILED(rv))) {
@@ -92,54 +98,57 @@ UrlClassifierFeatureFingerprinting::Mayb
   bool isThirdParty =
       nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
   if (!isThirdParty) {
     if (UC_LOG_ENABLED()) {
       nsCString spec = chanURI->GetSpecOrDefault();
       spec.Truncate(
           std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
       UC_LOG(
-          ("UrlClassifierFeatureFingerprinting: Skipping fingerprinting checks "
+          ("UrlClassifierFeatureFingerprintingProtection: Skipping "
+           "fingerprinting checks "
            "for first party or top-level load channel[%p] "
            "with uri %s",
            aChannel, spec.get()));
     }
 
     return nullptr;
   }
 
   if (!UrlClassifierCommon::ShouldEnableClassifier(aChannel)) {
     return nullptr;
   }
 
   MaybeInitialize();
-  MOZ_ASSERT(gFeatureFingerprinting);
+  MOZ_ASSERT(gFeatureFingerprintingProtection);
 
-  RefPtr<UrlClassifierFeatureFingerprinting> self = gFeatureFingerprinting;
+  RefPtr<UrlClassifierFeatureFingerprintingProtection> self =
+      gFeatureFingerprintingProtection;
   return self.forget();
 }
 
 /* static */
 already_AddRefed<nsIUrlClassifierFeature>
-UrlClassifierFeatureFingerprinting::GetIfNameMatches(const nsACString& aName) {
+UrlClassifierFeatureFingerprintingProtection::GetIfNameMatches(
+    const nsACString& aName) {
   if (!aName.EqualsLiteral(FINGERPRINTING_FEATURE_NAME)) {
     return nullptr;
   }
 
   MaybeInitialize();
-  MOZ_ASSERT(gFeatureFingerprinting);
+  MOZ_ASSERT(gFeatureFingerprintingProtection);
 
-  RefPtr<UrlClassifierFeatureFingerprinting> self = gFeatureFingerprinting;
+  RefPtr<UrlClassifierFeatureFingerprintingProtection> self =
+      gFeatureFingerprintingProtection;
   return self.forget();
 }
 
 NS_IMETHODIMP
-UrlClassifierFeatureFingerprinting::ProcessChannel(nsIChannel* aChannel,
-                                                   const nsACString& aList,
-                                                   bool* aShouldContinue) {
+UrlClassifierFeatureFingerprintingProtection::ProcessChannel(
+    nsIChannel* aChannel, const nsACString& aList, bool* aShouldContinue) {
   NS_ENSURE_ARG_POINTER(aChannel);
   NS_ENSURE_ARG_POINTER(aShouldContinue);
 
   bool isAllowListed =
       IsAllowListed(aChannel, AntiTrackingCommon::eFingerprinting);
 
   // This is a blocking feature.
   *aShouldContinue = isAllowListed;
@@ -153,34 +162,35 @@ UrlClassifierFeatureFingerprinting::Proc
     UrlClassifierCommon::NotifyChannelClassifierProtectionDisabled(
         aChannel, nsIWebProgressListener::STATE_LOADED_FINGERPRINTING_CONTENT);
   } else {
     UrlClassifierCommon::SetBlockedContent(aChannel,
                                            NS_ERROR_FINGERPRINTING_URI, aList,
                                            EmptyCString(), EmptyCString());
 
     UC_LOG(
-        ("UrlClassifierFeatureFingerprinting::ProcessChannel, cancelling "
+        ("UrlClassifierFeatureFingerprintingProtection::ProcessChannel, "
+         "cancelling "
          "channel[%p]",
          aChannel));
     nsCOMPtr<nsIHttpChannelInternal> httpChannel = do_QueryInterface(aChannel);
 
     if (httpChannel) {
       Unused << httpChannel->CancelByChannelClassifier(
           NS_ERROR_FINGERPRINTING_URI);
     } else {
       Unused << aChannel->Cancel(NS_ERROR_FINGERPRINTING_URI);
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-UrlClassifierFeatureFingerprinting::GetURIByListType(
+UrlClassifierFeatureFingerprintingProtection::GetURIByListType(
     nsIChannel* aChannel, nsIUrlClassifierFeature::listType aListType,
     nsIURI** aURI) {
   NS_ENSURE_ARG_POINTER(aChannel);
   NS_ENSURE_ARG_POINTER(aURI);
 
   if (aListType == nsIUrlClassifierFeature::blacklist) {
     return aChannel->GetURI(aURI);
   }
rename from netwerk/url-classifier/UrlClassifierFeatureFingerprinting.h
rename to netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.h
--- a/netwerk/url-classifier/UrlClassifierFeatureFingerprinting.h
+++ b/netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.h
@@ -1,46 +1,46 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=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/. */
 
-#ifndef mozilla_net_UrlClassifierFeatureFingerprinting_h
-#define mozilla_net_UrlClassifierFeatureFingerprinting_h
+#ifndef mozilla_net_UrlClassifierFeatureFingerprintingProtection_h
+#define mozilla_net_UrlClassifierFeatureFingerprintingProtection_h
 
 #include "UrlClassifierFeatureBase.h"
 
 class nsIChannel;
 
 namespace mozilla {
 namespace net {
 
-class UrlClassifierFeatureFingerprinting final
+class UrlClassifierFeatureFingerprintingProtection final
     : public UrlClassifierFeatureBase {
  public:
   static const char* Name();
 
   static void MaybeShutdown();
 
-  static already_AddRefed<UrlClassifierFeatureFingerprinting> MaybeCreate(
-      nsIChannel* aChannel);
+  static already_AddRefed<UrlClassifierFeatureFingerprintingProtection>
+  MaybeCreate(nsIChannel* aChannel);
 
   static already_AddRefed<nsIUrlClassifierFeature> GetIfNameMatches(
       const nsACString& aName);
 
   NS_IMETHOD ProcessChannel(nsIChannel* aChannel, const nsACString& aList,
                             bool* aShouldContinue) override;
 
   NS_IMETHOD GetURIByListType(nsIChannel* aChannel,
                               nsIUrlClassifierFeature::listType aListType,
                               nsIURI** aURI) override;
 
  private:
-  UrlClassifierFeatureFingerprinting();
+  UrlClassifierFeatureFingerprintingProtection();
 
   static void MaybeInitialize();
 };
 
 }  // namespace net
 }  // namespace mozilla
 
-#endif  // mozilla_net_UrlClassifierFeatureFingerprinting_h
+#endif  // mozilla_net_UrlClassifierFeatureFingerprintingProtection_h
--- a/netwerk/url-classifier/moz.build
+++ b/netwerk/url-classifier/moz.build
@@ -17,20 +17,20 @@ XPIDL_MODULE = 'url-classifier'
 DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
 DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
 
 UNIFIED_SOURCES += [
     'AsyncUrlChannelClassifier.cpp',
     'nsChannelClassifier.cpp',
     'UrlClassifierCommon.cpp',
     'UrlClassifierFeatureBase.cpp',
-    'UrlClassifierFeatureCryptomining.cpp',
+    'UrlClassifierFeatureCryptominingProtection.cpp',
     'UrlClassifierFeatureCustomTables.cpp',
     'UrlClassifierFeatureFactory.cpp',
-    'UrlClassifierFeatureFingerprinting.cpp',
+    'UrlClassifierFeatureFingerprintingProtection.cpp',
     'UrlClassifierFeatureFlash.cpp',
     'UrlClassifierFeatureLoginReputation.cpp',
     'UrlClassifierFeaturePhishingProtection.cpp',
     'UrlClassifierFeatureResult.cpp',
     'UrlClassifierFeatureTrackingAnnotation.cpp',
     'UrlClassifierFeatureTrackingProtection.cpp',
 ]
 
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -48,17 +48,16 @@ XPCOMUtils.defineLazyModuleGetters(this,
   ExtensionTelemetry: "resource://gre/modules/ExtensionTelemetry.jsm",
   FileSource: "resource://gre/modules/L10nRegistry.jsm",
   L10nRegistry: "resource://gre/modules/L10nRegistry.jsm",
   Log: "resource://gre/modules/Log.jsm",
   MessageChannel: "resource://gre/modules/MessageChannel.jsm",
   NetUtil: "resource://gre/modules/NetUtil.jsm",
   OS: "resource://gre/modules/osfile.jsm",
   PluralForm: "resource://gre/modules/PluralForm.jsm",
-  PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
   Schemas: "resource://gre/modules/Schemas.jsm",
   XPIProvider: "resource://gre/modules/addons/XPIProvider.jsm",
 });
 
 // This is used for manipulating jar entry paths, which always use Unix
 // separators.
 XPCOMUtils.defineLazyGetter(
   this, "OSPath", () => {
@@ -1901,20 +1900,17 @@ class Extension extends ExtensionData {
       if (this.errors.length) {
         return Promise.reject({errors: this.errors});
       }
 
       if (this.hasShutdown) {
         return;
       }
 
-      // We automatically add permissions to some extensions:
-      // 1. system/built-in extensions
-      // 2. all extensions when in permanent private browsing
-      //
+      // We automatically add permissions to system/built-in extensions.
       // Extensions expliticy stating not_allowed will never get permission.
       if (!allowPrivateBrowsingByDefault && this.manifest.incognito !== "not_allowed" &&
           !this.permissions.has(PRIVATE_ALLOWED_PERMISSION)) {
         if (this.isPrivileged && !this.addonData.temporarilyInstalled) {
           // Add to EP so it is preserved after ADDON_INSTALL.  We don't wait on the add here
           // since we are pushing the value into this.permissions.  EP will eventually save.
           ExtensionPermissions.add(this.id, {permissions: [PRIVATE_ALLOWED_PERMISSION], origins: []});
           this.permissions.add(PRIVATE_ALLOWED_PERMISSION);
@@ -1939,27 +1935,16 @@ class Extension extends ExtensionData {
         } else if (ExtensionStorageIDB.isMigratedExtension(this)) {
           this.setSharedData("storageIDBBackend", true);
           this.setSharedData("storageIDBPrincipal", ExtensionStorageIDB.getStoragePrincipal(this));
         }
       }
 
       resolveReadyPromise(this.policy);
 
-      // When in PPB skip any startup and disable the policy if the extension
-      // does not have permission.
-      if (PrivateBrowsingUtils.permanentPrivateBrowsing && !this.privateBrowsingAllowed) {
-        this.state = "Startup: Cancelled: (not running in permenant private browsing mode)";
-
-        this.policy.active = false;
-
-        this.cleanupGeneratedFile();
-        return;
-      }
-
       // The "startup" Management event sent on the extension instance itself
       // is emitted just before the Management "startup" event,
       // and it is used to run code that needs to be executed before
       // any of the "startup" listeners.
       this.emit("startup", this);
 
       let state = new Set(["Emit startup", "Run manifest"]);
       this.state = `Startup: ${Array.from(state)}`;
--- a/toolkit/components/extensions/test/xpcshell/test_ext_background_private_browsing.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_background_private_browsing.js
@@ -28,32 +28,8 @@ add_task(async function test_background_
   });
 
   await extension.startup();
 
   await extension.awaitFinish("incognito");
 
   await extension.unload();
 });
-
-add_task(async function test_background_PPB_not_allowed() {
-  info("Test background page incognito value with permanent private browsing enabled");
-
-  Services.prefs.setBoolPref("extensions.allowPrivateBrowsingByDefault", false);
-  Services.prefs.setBoolPref("browser.privatebrowsing.autostart", true);
-  registerCleanupFunction(() => {
-    Services.prefs.clearUserPref("browser.privatebrowsing.autostart");
-    Services.prefs.clearUserPref("extensions.allowPrivateBrowsingByDefault");
-  });
-
-  let extension = ExtensionTestUtils.loadExtension({
-    async background() {
-      browser.test.notifyFail("incognito");
-    },
-  });
-
-  await extension.startup();
-
-  let state = extension.extension.state;
-  ok(state.startsWith("Startup: Cancelled"), `extension startup state should be cancelled "${state}"`);
-
-  await extension.unload();
-});