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

Unified Diff: third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.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/push_messaging/ServiceWorkerRegistrationPush.cpp
diff --git a/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.cpp b/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.cpp
index 583ce9ef573eb134f405e57944501b1d0d10360f..b3e9010c9ddc0795d829deb3bb285fae04a5ab0c 100644
--- a/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/ServiceWorkerRegistrationPush.cpp
@@ -10,8 +10,8 @@
namespace blink {
ServiceWorkerRegistrationPush::ServiceWorkerRegistrationPush(
- ServiceWorkerRegistration& registration)
- : Supplement<ServiceWorkerRegistration>(registration) {}
+ ServiceWorkerRegistration* registration)
+ : m_registration(registration) {}
ServiceWorkerRegistrationPush::~ServiceWorkerRegistrationPush() {}
@@ -26,7 +26,7 @@
Supplement<ServiceWorkerRegistration>::from(registration,
supplementName()));
if (!supplement) {
- supplement = new ServiceWorkerRegistrationPush(registration);
+ supplement = new ServiceWorkerRegistrationPush(&registration);
provideTo(registration, supplementName(), supplement);
}
return *supplement;
@@ -39,11 +39,12 @@
PushManager* ServiceWorkerRegistrationPush::pushManager() {
if (!m_pushManager)
- m_pushManager = PushManager::create(supplementable());
+ m_pushManager = PushManager::create(m_registration);
return m_pushManager.get();
}
DEFINE_TRACE(ServiceWorkerRegistrationPush) {
+ visitor->trace(m_registration);
visitor->trace(m_pushManager);
Supplement<ServiceWorkerRegistration>::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698