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

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: Created 5 years, 11 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
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 aa954ee1dd0f34a158417c8675def8e9efc585cb..89edad276fb1ae7d78e544d0d8b74092982fa0a1 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -561,6 +561,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());
nhiroki 2015/02/04 05:18:27 I'm not really sure whether we have to call SetTop
kinuko 2015/02/04 07:12:52 Basically topmost_frame_url is used to lookup cook
nhiroki 2015/02/05 05:28:40 I see. Already running worker wouldn't have to tak
+
ServiceWorkerRegistrationObjectInfo info;
ServiceWorkerVersionAttributes attrs;
GetRegistrationObjectInfoAndVersionAttributes(

Powered by Google App Engine
This is Rietveld 408576698