protocol.js 870 B

12345678910111213141516171819202122232425
  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 } = require("chrome");
  10. const Services = require("Services");
  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 protocol.js is deprecated. Please use " +
  15. "require(\"devtools/shared/protocol\") to load this " +
  16. "module.",
  17. "https://bugzil.la/1270173");
  18. }
  19. module.exports = require("devtools/shared/protocol");