promises.js 763 B

12345678910111213141516171819202122232425262728
  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. Front,
  7. FrontClassWithSpec,
  8. } = require("devtools/shared/protocol");
  9. const { promisesSpec } = require("devtools/shared/specs/promises");
  10. /**
  11. * PromisesFront, the front for the PromisesActor.
  12. */
  13. const PromisesFront = FrontClassWithSpec(promisesSpec, {
  14. initialize: function (client, form) {
  15. Front.prototype.initialize.call(this, client, form);
  16. this.actorID = form.promisesActor;
  17. this.manage(this);
  18. },
  19. destroy: function () {
  20. Front.prototype.destroy.call(this);
  21. }
  22. });
  23. exports.PromisesFront = PromisesFront;