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

MozReview-Commit-ID: 1CSeNU9Nfll

Depends on D8821

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2018-10-30 08:08:29 +00:00
Родитель 5464dd4264
Коммит 2c52a12910
4 изменённых файлов: 7 добавлений и 7 удалений

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

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

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

@ -56,7 +56,7 @@ class WorkersPanel extends Component {
const client = this.props.client;
client.addListener("workerListChanged", this.updateWorkers);
client.addListener("serviceWorkerRegistrationListChanged", this.updateWorkers);
client.addListener("processListChanged", this.updateWorkers);
client.mainRoot.on("processListChanged", this.updateWorkers);
client.addListener("registration-changed", this.updateWorkers);
// Some notes about these observers:
@ -80,7 +80,7 @@ class WorkersPanel extends Component {
componentWillUnmount() {
const client = this.props.client;
client.removeListener("processListChanged", this.updateWorkers);
client.mainRoot.off("processListChanged", this.updateWorkers);
client.removeListener("serviceWorkerRegistrationListChanged", this.updateWorkers);
client.removeListener("workerListChanged", this.updateWorkers);
client.removeListener("registration-changed", this.updateWorkers);

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

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

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

@ -56,7 +56,7 @@ function runTests() {
function listProcess() {
// Call listProcesses in order to start receiving new process notifications
client.addListener("processListChanged", function listener() {
client.mainRoot.on("processListChanged", function listener() {
client.removeListener("processListChanged", listener);
ok(true, "Received processListChanged event");
getProcess();