Commit 5b8ccb75 authored by Kristen Wright's avatar Kristen Wright
Browse files

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
parent dd440a30
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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);
  }
+6 −0
Original line number Diff line number Diff line
@@ -2657,6 +2657,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
+0 −7
Original line number Diff line number Diff line
@@ -1047,13 +1047,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