Simulator.jsm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. "use strict";
  5. /**
  6. * This file only exists to support add-ons which import this module at a
  7. * specific path.
  8. */
  9. const Cu = Components.utils;
  10. const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
  11. const WARNING_PREF = "devtools.migration.warnings";
  12. if (Services.prefs.getBoolPref(WARNING_PREF)) {
  13. const { Deprecated } = Cu.import("resource://gre/modules/Deprecated.jsm", {});
  14. Deprecated.warning("This path to Simulator.jsm is deprecated. Please use " +
  15. "Cu.import(\"resource://devtools/shared/" +
  16. "apps/Simulator.jsm\") to load this module.",
  17. "https://bugzil.la/912121");
  18. }
  19. this.EXPORTED_SYMBOLS = [
  20. "Simulator",
  21. ];
  22. const module =
  23. Cu.import("resource://devtools/shared/apps/Simulator.jsm", {});
  24. for (let symbol of this.EXPORTED_SYMBOLS) {
  25. this[symbol] = module[symbol];
  26. }