Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: content/browser/service_worker/service_worker_dispatcher_host.cc

Issue 893363003: ServiceWorker: Support SWRegistration.unregister() in SWGlobalScope [1/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update header comment4 Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/service_worker/embedded_worker_context_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_dispatcher_host.cc
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
index 89d45807fd71b712f24ccd795934aaa75970dbb7..e707151e9f77aab3a9fb2ec3028688b3e1abf7e3 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -583,6 +583,10 @@ void ServiceWorkerDispatcherHost::OnSetHostedVersionId(
GetContext()->GetLiveRegistration(version->registration_id());
DCHECK(registration);
+ // Set the document URL to the script url in order to allow
+ // register/unregister/getRegistration on ServiceWorkerGlobalScope.
+ provider_host->SetDocumentUrl(version->script_url());
+
ServiceWorkerRegistrationObjectInfo info;
ServiceWorkerVersionAttributes attrs;
GetRegistrationObjectInfoAndVersionAttributes(
« no previous file with comments | « no previous file | content/renderer/service_worker/embedded_worker_context_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698