gecko-dev/devtools/shared/fronts/worker/service-worker.js
Alexandre Poirot d028804ade Bug 1515862 - Remove unecessary usages of actorid checks in actor and front's form method. r=jdescottes
Remove all actorid checks in actors and fronts as we never pass a defined `detail` argument in them.
Only domstylerule and node are using detail and that, always with detail="actorid".
Also remove ctx and detail in Front constructor as that's not used by these two actors.

Depends on D17612

Differential Revision: https://phabricator.services.mozilla.com/D17613

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:39 +00:00

29 lines
769 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { serviceWorkerSpec } = require("devtools/shared/specs/worker/service-worker");
const { FrontClassWithSpec, registerFront } = require("devtools/shared/protocol");
class ServiceWorkerFront extends FrontClassWithSpec(serviceWorkerSpec) {
get fetch() {
return this._form.fetch;
}
get url() {
return this._form.url;
}
get state() {
return this._form.state;
}
form(form) {
this.actorID = form.actor;
this._form = form;
}
}
exports.ServiceWorkerFront = ServiceWorkerFront;
registerFront(ServiceWorkerFront);