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

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

Issue 682003003: Simplify WebServiceWorker{Registration}Proxy interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove incorrect FIXME Created 6 years, 2 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/ServiceWorker.cpp ('k') | Source/platform/blink_platform.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
index 999df873b2cd8487d0d6f81d3a3195d22beb8d7d..98eb6182cc78029cf6382b6f68f193b5970bb6ee 100644
--- a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -126,13 +126,10 @@ ServiceWorkerRegistration* ServiceWorkerRegistration::getOrCreate(ExecutionConte
if (!outerRegistration)
return 0;
- WebServiceWorkerRegistrationProxy* proxy = outerRegistration->proxy();
- if (proxy) {
- ServiceWorkerRegistration* existingRegistration = *proxy;
- if (existingRegistration) {
- ASSERT(existingRegistration->executionContext() == executionContext);
- return existingRegistration;
- }
+ ServiceWorkerRegistration* existingRegistration = static_cast<ServiceWorkerRegistration*>(outerRegistration->proxy());
+ if (existingRegistration) {
+ ASSERT(existingRegistration->executionContext() == executionContext);
+ return existingRegistration;
}
ServiceWorkerRegistration* registration = new ServiceWorkerRegistration(executionContext, adoptPtr(outerRegistration));
@@ -142,7 +139,6 @@ ServiceWorkerRegistration* ServiceWorkerRegistration::getOrCreate(ExecutionConte
ServiceWorkerRegistration::ServiceWorkerRegistration(ExecutionContext* executionContext, PassOwnPtr<WebServiceWorkerRegistration> outerRegistration)
: ActiveDOMObject(executionContext)
- , WebServiceWorkerRegistrationProxy(this)
, m_outerRegistration(outerRegistration)
, m_provider(0)
, m_stopped(false)
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorker.cpp ('k') | Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698