author | Tim Huang <tihuang@mozilla.com> |
Thu, 14 Sep 2017 15:11:21 +0800 | |
changeset 430889 | bb14bbb30c4150b69d541d4c9f32762721a9ccc2 |
parent 430888 | 0806dedfeae9b2af24698cb9d004bd0e5e46ba23 |
child 430890 | 2189a968511ee8f51eb2deb046bd7914a76a693b |
push id | 7775 |
push user | ryanvm@gmail.com |
push date | Tue, 19 Sep 2017 01:22:09 +0000 |
treeherder | mozilla-beta@a0f805dbe65d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | arthuredelstein, mossop |
bugs | 1384330 |
milestone | 57.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
|
--- a/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp +++ b/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp @@ -15,16 +15,22 @@ #include "nsIDocShell.h" #include "nsIScriptObjectPrincipal.h" namespace mozilla { using namespace mozilla::dom; static bool IsValidHost(const nsACString& host) { + // This hidden pref allows users to disable mozAddonManager entirely if they want + // for fingerprinting resistance. Someone like Tor browser will use this pref. + if (Preferences::GetBool("privacy.resistFingerprinting.block_mozAddonManager")) { + return false; + } + // This is ugly, but Preferences.h doesn't have support // for default prefs or locked prefs nsCOMPtr<nsIPrefService> prefService (do_GetService(NS_PREFSERVICE_CONTRACTID)); nsCOMPtr<nsIPrefBranch> prefs; if (prefService) { prefService->GetDefaultBranch(nullptr, getter_AddRefs(prefs)); bool isEnabled; if (NS_SUCCEEDED(prefs->GetBoolPref("xpinstall.enabled", &isEnabled)) && !isEnabled) {