actor-registry.js 877 B

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. const {
  6. Arg,
  7. RetVal,
  8. generateActorSpec,
  9. } = require("devtools/shared/protocol");
  10. const actorActorSpec = generateActorSpec({
  11. typeName: "actorActor",
  12. methods: {
  13. unregister: {
  14. request: {},
  15. response: {}
  16. }
  17. },
  18. });
  19. exports.actorActorSpec = actorActorSpec;
  20. const actorRegistrySpec = generateActorSpec({
  21. typeName: "actorRegistry",
  22. methods: {
  23. registerActor: {
  24. request: {
  25. sourceText: Arg(0, "string"),
  26. filename: Arg(1, "string"),
  27. options: Arg(2, "json")
  28. },
  29. response: {
  30. actorActor: RetVal("actorActor")
  31. }
  32. }
  33. }
  34. });
  35. exports.actorRegistrySpec = actorRegistrySpec;