gecko-dev/devtools/shared/fronts/worker/push-subscription.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

34 lines
866 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 { pushSubscriptionSpec } =
require("devtools/shared/specs/worker/push-subscription");
const { FrontClassWithSpec, registerFront } = require("devtools/shared/protocol");
class PushSubscriptionFront extends FrontClassWithSpec(pushSubscriptionSpec) {
get endpoint() {
return this._form.endpoint;
}
get pushCount() {
return this._form.pushCount;
}
get lastPush() {
return this._form.lastPush;
}
get quota() {
return this._form.quota;
}
form(form) {
this.actorID = form.actor;
this._form = form;
}
}
exports.PushSubscriptionFront = PushSubscriptionFront;
registerFront(PushSubscriptionFront);