Bug 1485661 - Adapt serviceWorkerRegistrationListChanged to new front. r=yulia

MozReview-Commit-ID: 8LRQqXYXe9W

Depends on D8823

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2018-10-30 08:08:33 +00:00
Родитель 16ecef72d9
Коммит 354db59f74
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -69,7 +69,7 @@ function debugTargetListenerMiddleware(store) {
if (isSupportedDebugTarget(runtime.type, DEBUG_TARGETS.WORKER)) {
client.mainRoot.on("workerListChanged", onWorkersUpdated);
client.addListener("serviceWorkerRegistrationListChanged", onWorkersUpdated);
client.mainRoot.on("serviceWorkerRegistrationListChanged", onWorkersUpdated);
client.mainRoot.on("processListChanged", onWorkersUpdated);
client.addListener("registration-changed", onWorkersUpdated);
client.addListener("push-subscription-modified", onWorkersUpdated);
@ -90,7 +90,7 @@ function debugTargetListenerMiddleware(store) {
if (isSupportedDebugTarget(runtime.type, DEBUG_TARGETS.WORKER)) {
client.mainRoot.off("workerListChanged", onWorkersUpdated);
client.removeListener("serviceWorkerRegistrationListChanged", onWorkersUpdated);
client.mainRoot.off("serviceWorkerRegistrationListChanged", onWorkersUpdated);
client.mainRoot.off("processListChanged", onWorkersUpdated);
client.removeListener("registration-changed", onWorkersUpdated);
client.removeListener("push-subscription-modified", onWorkersUpdated);

Просмотреть файл

@ -62,7 +62,7 @@ class WorkersPanel extends Component {
client.addListener("workerListChanged", this.updateWorkers);
client.mainRoot.on("workerListChanged", this.updateWorkers);
client.addListener("serviceWorkerRegistrationListChanged", this.updateWorkers);
client.mainRoot.on("serviceWorkerRegistrationListChanged", this.updateWorkers);
client.mainRoot.on("processListChanged", this.updateWorkers);
client.addListener("registration-changed", this.updateWorkers);
@ -88,7 +88,7 @@ class WorkersPanel extends Component {
componentWillUnmount() {
const client = this.props.client;
client.mainRoot.off("processListChanged", this.updateWorkers);
client.removeListener("serviceWorkerRegistrationListChanged", this.updateWorkers);
client.mainRoot.off("serviceWorkerRegistrationListChanged", this.updateWorkers);
client.mainRoot.off("workerListChanged", this.updateWorkers);
client.removeListener("workerListChanged", this.updateWorkers);
client.removeListener("registration-changed", this.updateWorkers);

Просмотреть файл

@ -44,7 +44,7 @@ window.Application = {
},
};
this.toolbox.target.activeTab.on("workerListChanged", this.updateWorkers);
this.client.addListener("serviceWorkerRegistrationListChanged", this.updateWorkers);
this.client.mainRoot.on("serviceWorkerRegistrationListChanged", this.updateWorkers);
this.client.addListener("registration-changed", this.updateWorkers);
this.client.mainRoot.on("processListChanged", this.updateWorkers);
this.toolbox.target.on("navigate", this.updateDomain);
@ -89,7 +89,7 @@ window.Application = {
destroy() {
this.toolbox.target.activeTab.off("workerListChanged", this.updateWorkers);
this.client.removeListener("serviceWorkerRegistrationListChanged",
this.client.mainRoot.off("serviceWorkerRegistrationListChanged",
this.updateWorkers);
this.client.removeListener("registration-changed", this.updateWorkers);
this.client.mainRoot.off("processListChanged", this.updateWorkers);