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( |