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

Unified Diff: third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp

Issue 2686613004: Revert of Use a new Supplement constructor for ServiceWorkerRegistration supplements (Closed)
Patch Set: Created 3 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
Index: third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp
diff --git a/third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp b/third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp
index a3ceba1c7caf79a15bf746097400ded8bcc44960..1e5292773eb6b909db1c8720c6ac83d67aaec246 100644
--- a/third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp
+++ b/third_party/WebKit/Source/modules/background_sync/ServiceWorkerRegistrationSync.cpp
@@ -10,8 +10,8 @@
namespace blink {
ServiceWorkerRegistrationSync::ServiceWorkerRegistrationSync(
- ServiceWorkerRegistration& registration)
- : Supplement<ServiceWorkerRegistration>(registration) {}
+ ServiceWorkerRegistration* registration)
+ : m_registration(registration) {}
ServiceWorkerRegistrationSync::~ServiceWorkerRegistrationSync() {}
@@ -26,7 +26,7 @@
Supplement<ServiceWorkerRegistration>::from(registration,
supplementName()));
if (!supplement) {
- supplement = new ServiceWorkerRegistrationSync(registration);
+ supplement = new ServiceWorkerRegistrationSync(&registration);
provideTo(registration, supplementName(), supplement);
}
return *supplement;
@@ -39,11 +39,12 @@
SyncManager* ServiceWorkerRegistrationSync::sync() {
if (!m_syncManager)
- m_syncManager = SyncManager::create(supplementable());
+ m_syncManager = SyncManager::create(m_registration);
return m_syncManager.get();
}
DEFINE_TRACE(ServiceWorkerRegistrationSync) {
+ visitor->trace(m_registration);
visitor->trace(m_syncManager);
Supplement<ServiceWorkerRegistration>::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698