testactors-no-bulk.js 694 B

12345678910111213141516171819202122232425262728
  1. /* Any copyright is dedicated to the Public Domain.
  2. http://creativecommons.org/publicdomain/zero/1.0/ */
  3. const { RootActor } = require("devtools/server/actors/root");
  4. const { DebuggerServer } = require("devtools/server/main");
  5. /**
  6. * Root actor that doesn't have the bulk trait.
  7. */
  8. function createRootActor(aConnection) {
  9. let root = new RootActor(aConnection, {
  10. globalActorFactories: DebuggerServer.globalActorFactories
  11. });
  12. root.applicationType = "xpcshell-tests";
  13. root.traits = {
  14. bulk: false
  15. };
  16. return root;
  17. }
  18. exports.register = function (handle) {
  19. handle.setRootActor(createRootActor);
  20. };
  21. exports.unregister = function (handle) {
  22. handle.setRootActor(null);
  23. };