Bug 1622111 - Convert dom.use_components_shim to static pref. r=njn

Converts dom.use_components_shim to a static pref and removes its `all.js` entry.

Differential Revision: https://phabricator.services.mozilla.com/D67184

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kristen Wright 2020-03-19 00:54:22 +00:00
Родитель 6c22e40a82
Коммит d4f1210e56
3 изменённых файлов: 7 добавлений и 15 удалений

Просмотреть файл

@ -2813,14 +2813,7 @@ bool nsGlobalWindowInner::DoResolve(
// We support a cut-down Components.interfaces in case websites are
// using Components.interfaces.nsIFoo.CONSTANT_NAME for the ones
// that have constants.
static bool watchingComponentsPref = false;
static bool useComponentsShim = false;
if (!watchingComponentsPref) {
watchingComponentsPref = true;
Preferences::AddBoolVarCache(&useComponentsShim, "dom.use_components_shim",
true);
}
if (useComponentsShim &&
if (StaticPrefs::dom_use_components_shim() &&
aId == XPCJSRuntime::Get()->GetStringID(XPCJSContext::IDX_COMPONENTS)) {
return ResolveComponentsShim(aCx, aObj, aDesc);
}

Просмотреть файл

@ -2664,6 +2664,12 @@
value: 5000
mirror: always
# Whether to shim a Components object on untrusted windows.
- name: dom.use_components_shim
type: bool
value: @IS_NOT_NIGHTLY_BUILD@
mirror: always
- name: dom.vibrator.enabled
type: bool
value: true

Просмотреть файл

@ -1055,13 +1055,6 @@ pref("dom.select_popup_in_parent.enabled", false);
pref("dom.cycle_collector.incremental", true);
// Whether to shim a Components object on untrusted windows.
#ifdef NIGHTLY_BUILD
pref("dom.use_components_shim", false);
#else // NIGHTLY_BUILD
pref("dom.use_components_shim", true);
#endif // NIGHTLY_BUILD
// Disable popups from plugins by default
// 0 = openAllowed
// 1 = openControlled