From f145a56427aca178e912fd3515b7b33e86a4e880 Mon Sep 17 00:00:00 2001 From: Daisuke Akatsuka Date: Thu, 18 Apr 2019 00:47:37 +0000 Subject: [PATCH] Bug 1539328: Introduce new unique id for service worker actor. r=jdescottes Depends on D25771 Differential Revision: https://phabricator.services.mozilla.com/D25772 --HG-- extra : moz-landing-system : lando --- .../client/aboutdebugging-new/src/actions/debug-targets.js | 1 + devtools/shared/fronts/root.js | 2 +- devtools/shared/fronts/worker/service-worker-registration.js | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/devtools/client/aboutdebugging-new/src/actions/debug-targets.js b/devtools/client/aboutdebugging-new/src/actions/debug-targets.js index 5af9335c519a..d7b69c40210a 100644 --- a/devtools/client/aboutdebugging-new/src/actions/debug-targets.js +++ b/devtools/client/aboutdebugging-new/src/actions/debug-targets.js @@ -70,6 +70,7 @@ function getTabForUrl(url) { function inspectDebugTarget(type, id) { return async (dispatch, getState) => { const runtime = getCurrentRuntime(getState().runtimes); + id = encodeURIComponent(id); let url; if (runtime.id === RUNTIMES.THIS_FIREFOX && !isCachedActorNeeded(runtime, type, id)) { diff --git a/devtools/shared/fronts/root.js b/devtools/shared/fronts/root.js index 60954faa6c34..058a5cb0077e 100644 --- a/devtools/shared/fronts/root.js +++ b/devtools/shared/fronts/root.js @@ -95,7 +95,7 @@ class RootFront extends FrontClassWithSpec(rootSpec) { result.service.push({ active: front.active, fetch: front.fetch, - id: front.actorID, + id: front.id, lastUpdateTime: front.lastUpdateTime, name: front.url, registrationFront: front, diff --git a/devtools/shared/fronts/worker/service-worker-registration.js b/devtools/shared/fronts/worker/service-worker-registration.js index 8a4999402804..9652d10d29d8 100644 --- a/devtools/shared/fronts/worker/service-worker-registration.js +++ b/devtools/shared/fronts/worker/service-worker-registration.js @@ -17,6 +17,10 @@ class ServiceWorkerRegistrationFront extends return this._form.fetch; } + get id() { + return this.url; + } + get lastUpdateTime() { return this._form.lastUpdateTime; }