2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:23 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# 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/.
|
|
|
|
|
2017-03-09 13:33:31 +03:00
|
|
|
with Files("**"):
|
|
|
|
BUG_COMPONENT = ("Core", "Preferences: Backend")
|
|
|
|
|
2017-04-08 17:45:10 +03:00
|
|
|
if CONFIG["ENABLE_TESTS"]:
|
|
|
|
DIRS += ["test/gtest"]
|
|
|
|
|
2015-02-10 19:47:27 +03:00
|
|
|
XPCSHELL_TESTS_MANIFESTS += [
|
|
|
|
"test/unit/xpcshell.ini",
|
|
|
|
"test/unit_ipc/xpcshell.ini",
|
|
|
|
]
|
2013-03-19 22:47:00 +04:00
|
|
|
|
2014-08-08 08:52:04 +04:00
|
|
|
XPIDL_SOURCES += [
|
|
|
|
"nsIPrefBranch.idl",
|
|
|
|
"nsIPrefLocalizedString.idl",
|
|
|
|
"nsIPrefService.idl",
|
|
|
|
"nsIRelativeFilePref.idl",
|
|
|
|
]
|
|
|
|
|
|
|
|
XPIDL_MODULE = "pref"
|
|
|
|
|
2019-07-26 02:16:08 +03:00
|
|
|
pref_groups = [
|
|
|
|
"accessibility",
|
2020-05-24 21:27:35 +03:00
|
|
|
"alerts",
|
2019-07-26 02:16:08 +03:00
|
|
|
"apz",
|
|
|
|
"beacon",
|
2019-08-13 07:41:51 +03:00
|
|
|
"bidi",
|
2019-07-26 02:16:08 +03:00
|
|
|
"browser",
|
|
|
|
"canvas",
|
|
|
|
"channelclassifier",
|
|
|
|
"clipboard",
|
2019-08-01 19:05:49 +03:00
|
|
|
"content",
|
2020-06-09 17:45:38 +03:00
|
|
|
"converter",
|
2020-01-13 21:52:06 +03:00
|
|
|
"datareporting",
|
2019-07-26 02:16:08 +03:00
|
|
|
"device",
|
|
|
|
"devtools",
|
2019-05-22 23:19:19 +03:00
|
|
|
"docshell",
|
2019-07-26 02:16:08 +03:00
|
|
|
"dom",
|
|
|
|
"editor",
|
|
|
|
"extensions",
|
2019-08-27 03:09:29 +03:00
|
|
|
"findbar",
|
2019-07-26 02:16:08 +03:00
|
|
|
"fission",
|
2019-08-13 03:07:32 +03:00
|
|
|
"font",
|
2019-07-26 02:16:08 +03:00
|
|
|
"full_screen_api",
|
|
|
|
"general",
|
|
|
|
"geo",
|
|
|
|
"gfx",
|
|
|
|
"gl",
|
|
|
|
"html5",
|
|
|
|
"idle_period",
|
|
|
|
"image",
|
|
|
|
"intl",
|
|
|
|
"javascript",
|
|
|
|
"layers",
|
|
|
|
"layout",
|
2019-08-16 20:41:59 +03:00
|
|
|
"mathml",
|
2019-07-26 02:16:08 +03:00
|
|
|
"media",
|
|
|
|
"mousewheel",
|
|
|
|
"network",
|
|
|
|
"nglayout",
|
2019-08-02 11:52:42 +03:00
|
|
|
"page_load",
|
2019-09-21 11:38:26 +03:00
|
|
|
"permissions",
|
2019-07-26 02:16:08 +03:00
|
|
|
"plain_text",
|
2019-11-14 00:17:12 +03:00
|
|
|
"plugin",
|
2019-07-26 02:16:08 +03:00
|
|
|
"plugins",
|
|
|
|
"preferences",
|
|
|
|
"print",
|
|
|
|
"privacy",
|
2020-04-20 16:56:02 +03:00
|
|
|
"prompts",
|
2019-07-26 02:16:08 +03:00
|
|
|
"security",
|
2021-06-11 14:56:05 +03:00
|
|
|
"signon",
|
2019-07-26 02:16:08 +03:00
|
|
|
"slider",
|
Bug 1650201 - Fix mozStorage prefs read before profile and fallback to a non-exclusive VFS when it can't get an exclusive lock. r=asuth,geckoview-reviewers,agi
mozStorage used to read prefs on service init, because they could only be read
on the main-thread. When service init was moved earlier, it started trying
to read prefs too early, before the profile was set up, thus it ended up always
reading the default value.
This patch moves the only relevant pref to mirrored StaticPrefs that can be accessed
from different threads, and removes two preferences that apparently are not necessary
(they have been broken from a long time) for now.
In particular, providing a global synchronous setting is a footgun, each consumer should
decide about their synchronous needs, rather than abusing a dangerous "go fast" setting.
The page size is something we don't change from quite some time, and it's unlikely to be
used to run experiments in the wild before doing local measurements first, for which Try
builds are enough.
The remaining exclusiveLock pref is a bit controversial, because in general exclusive lock
is better for various reasons, and mostly it is necessary to use WAL on network shares.
Though developers may find it useful for debugging, and some third parties are doing
dangerous things (like copying over databases) to work around it, for which it's safer to
provide a less dangerous alternative.
Note exclusive lock only works on Unix-derived systems for now (no Windows implementation).
Finally, this introduces a fallback to exclusive lock, so that if a third party is using our
databases, so that we can't get an exclusive lock, we'll fallback to normal locking.
Differential Revision: https://phabricator.services.mozilla.com/D82717
2020-07-11 00:45:53 +03:00
|
|
|
"storage",
|
2019-07-26 02:16:08 +03:00
|
|
|
"svg",
|
|
|
|
"telemetry",
|
|
|
|
"test",
|
|
|
|
"threads",
|
2021-02-05 00:40:47 +03:00
|
|
|
"timer",
|
2019-07-26 02:16:08 +03:00
|
|
|
"toolkit",
|
|
|
|
"ui",
|
2020-06-01 19:57:27 +03:00
|
|
|
"urlclassifier",
|
2019-07-26 02:16:08 +03:00
|
|
|
"view_source",
|
|
|
|
"webgl",
|
|
|
|
"widget",
|
|
|
|
"xul",
|
2019-08-14 21:29:55 +03:00
|
|
|
"zoom",
|
2019-07-26 02:16:08 +03:00
|
|
|
]
|
|
|
|
if CONFIG["OS_TARGET"] == "Android":
|
|
|
|
pref_groups += [
|
2019-08-26 23:25:43 +03:00
|
|
|
"android",
|
|
|
|
"consoleservice",
|
2019-07-26 02:16:08 +03:00
|
|
|
]
|
|
|
|
if CONFIG["FUZZING"]:
|
2019-08-07 08:16:55 +03:00
|
|
|
pref_groups += ["fuzzing"]
|
2019-07-26 02:16:08 +03:00
|
|
|
pref_groups = tuple(sorted(pref_groups))
|
|
|
|
|
2019-08-07 08:16:55 +03:00
|
|
|
# Note: generate_static_pref_list.py relies on StaticPrefListAll.h being first.
|
|
|
|
gen_h = ["init/StaticPrefListAll.h"]
|
|
|
|
gen_h += ["StaticPrefsAll.h"]
|
|
|
|
gen_h += ["init/StaticPrefList_{}.h".format(pg) for pg in pref_groups]
|
|
|
|
gen_h += ["StaticPrefs_{}.h".format(pg) for pg in pref_groups]
|
|
|
|
|
|
|
|
gen_cpp = ["init/StaticPrefsCGetters.cpp"]
|
2019-07-26 02:16:08 +03:00
|
|
|
|
2019-08-07 08:16:55 +03:00
|
|
|
gen_rs = ["static_prefs.rs"]
|
2019-07-26 02:16:08 +03:00
|
|
|
|
2014-08-08 08:52:04 +04:00
|
|
|
EXPORTS.mozilla += [
|
2019-07-09 02:40:39 +03:00
|
|
|
"init/StaticPrefListBegin.h",
|
|
|
|
"init/StaticPrefListEnd.h",
|
2018-08-21 00:28:00 +03:00
|
|
|
"nsRelativeFilePref.h",
|
2014-08-08 08:52:04 +04:00
|
|
|
"Preferences.h",
|
2019-07-09 02:40:39 +03:00
|
|
|
"StaticPrefsBase.h",
|
2014-08-08 08:52:04 +04:00
|
|
|
]
|
2019-08-07 08:16:55 +03:00
|
|
|
EXPORTS.mozilla += sorted(["!" + g for g in gen_h])
|
|
|
|
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"Preferences.cpp",
|
|
|
|
"SharedPrefMap.cpp",
|
|
|
|
]
|
|
|
|
|
|
|
|
gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
|
2014-08-08 08:52:04 +04:00
|
|
|
|
2020-06-01 19:00:28 +03:00
|
|
|
GeneratedFile(
|
|
|
|
*gen_all_tuple,
|
|
|
|
script="init/generate_static_pref_list.py",
|
|
|
|
entry_point="emit_code",
|
|
|
|
inputs=["init/StaticPrefList.yaml"]
|
|
|
|
)
|
2019-07-18 03:08:20 +03:00
|
|
|
|
|
|
|
PYTHON_UNITTEST_MANIFESTS += [
|
|
|
|
"test/python.ini",
|
|
|
|
]
|
|
|
|
|
2019-01-30 03:03:41 +03:00
|
|
|
XPCOM_MANIFESTS += [
|
|
|
|
"components.conf",
|
|
|
|
]
|
|
|
|
|
2019-11-08 02:07:20 +03:00
|
|
|
SPHINX_TREES["/modules/libpref"] = "docs"
|
2019-08-01 05:11:07 +03:00
|
|
|
|
2014-08-08 08:52:04 +04:00
|
|
|
include("/ipc/chromium/chromium-config.mozbuild")
|
|
|
|
|
|
|
|
FINAL_LIBRARY = "xul"
|
|
|
|
|
|
|
|
DEFINES["OS_ARCH"] = CONFIG["OS_ARCH"]
|
|
|
|
DEFINES["MOZ_WIDGET_TOOLKIT"] = CONFIG["MOZ_WIDGET_TOOLKIT"]
|
2015-09-23 07:39:03 +03:00
|
|
|
|
2019-08-09 12:18:41 +03:00
|
|
|
if CONFIG["MOZ_SERVICES_SYNC"]:
|
|
|
|
DEFINES["MOZ_SERVICES_SYNC"] = True
|
|
|
|
|
2019-10-14 18:58:42 +03:00
|
|
|
if CONFIG["MOZ_BUILD_APP"] == "browser":
|
|
|
|
DEFINES["MOZ_BUILD_APP_IS_BROWSER"] = True
|
|
|
|
|
2019-05-22 21:27:11 +03:00
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
|
2019-05-30 18:22:09 +03:00
|
|
|
if not CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
|
|
|
|
FINAL_TARGET_PP_FILES[CONFIG["ANDROID_CPU_ARCH"]] += [
|
|
|
|
"greprefs.js",
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
for arch in CONFIG["MOZ_ANDROID_FAT_AAR_ARCHITECTURES"]:
|
|
|
|
FINAL_TARGET_FILES[arch] += [
|
|
|
|
"!/dist/fat-aar/output/{arch}/greprefs.js".format(arch=arch),
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
FINAL_TARGET_PP_FILES += [
|
|
|
|
"greprefs.js",
|
|
|
|
]
|
2021-01-28 01:54:25 +03:00
|
|
|
|
|
|
|
if CONFIG["MOZ_BACKGROUNDTASKS"]:
|
|
|
|
DEFINES["MOZ_BACKGROUNDTASKS"] = True
|