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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp

Issue 213223005: Use the Navigator's frame in navigator.serviceWorker and associated container. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/modules/serviceworkers/ServiceWorkerContainerClient.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp b/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
index e0f70dea39c5bedc92aae0d4c0738851b9252639..723ba2cd6d94deb75adcc789c7509639645b0473 100644
--- a/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerContainerClient.cpp
@@ -35,13 +35,13 @@ ServiceWorkerContainerClient* ServiceWorkerContainerClient::from(ExecutionContex
if (!document->frame())
return 0;
- ServiceWorkerContainerClient* client = static_cast<ServiceWorkerContainerClient*>(Supplement<Page>::from(document->page(), supplementName()));
+ ServiceWorkerContainerClient* client = static_cast<ServiceWorkerContainerClient*>(DocumentSupplement::from(document, supplementName()));
if (client)
return client;
// If it's not provided yet, create it lazily.
- document->page()->provideSupplement(ServiceWorkerContainerClient::supplementName(), ServiceWorkerContainerClient::create(document->frame()->loader().client()->createServiceWorkerProvider()));
- return static_cast<ServiceWorkerContainerClient*>(Supplement<Page>::from(document->page(), supplementName()));
+ document->provideSupplement(ServiceWorkerContainerClient::supplementName(), ServiceWorkerContainerClient::create(document->frame()->loader().client()->createServiceWorkerProvider()));
+ return static_cast<ServiceWorkerContainerClient*>(DocumentSupplement::from(document, supplementName()));
}
ASSERT(context->isWorkerGlobalScope());
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerContainerClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698