dbg-client.jsm 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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("dbg-client.jsm is deprecated. Please use " +
  15. "require(\"devtools/shared/client/main\") to load this " +
  16. "module.", "https://bugzil.la/912121");
  17. }
  18. const { require } =
  19. Cu.import("resource://devtools/shared/Loader.jsm", {});
  20. this.EXPORTED_SYMBOLS = ["DebuggerTransport",
  21. "DebuggerClient",
  22. "RootClient",
  23. "LongStringClient",
  24. "EnvironmentClient",
  25. "ObjectClient"];
  26. var client = require("devtools/shared/client/main");
  27. this.DebuggerClient = client.DebuggerClient;
  28. this.RootClient = client.RootClient;
  29. this.LongStringClient = client.LongStringClient;
  30. this.EnvironmentClient = client.EnvironmentClient;
  31. this.ObjectClient = client.ObjectClient;
  32. this.DebuggerTransport =
  33. require("devtools/shared/transport/transport").DebuggerTransport;