author Doug Thayer <>
Thu, 21 Mar 2019 23:14:26 +0000
changeset 465590 737807563dd566e320ba93b709dfbb29e1b8b14d
parent 455626 6b56696d713a7f7858f16235e37baa8307e73b49
child 481369 e8225f3e114bf1fc01f9e574cc41eb2df4e314c6
permissions -rw-r--r--
Bug 1441308 - Add the render root splitting pref r=sotaro Differential Revision:

/* 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 */

"use strict";

var EXPORTED_SYMBOLS = ["TransientPrefs"];

const {Preferences} = ChromeUtils.import("resource://gre/modules/Preferences.jsm");

var prefVisibility = new Map;

/* Use for preferences that should only be visible when they've been modified.
   When reset to their default state, they remain visible until restarting the
   application. */

var TransientPrefs = {
  prefShouldBeVisible(prefName) {
    if (Preferences.isSet(prefName))
      prefVisibility.set(prefName, true);

    return !!prefVisibility.get(prefName);