| Index: third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
|
| diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
|
| index 31d53e500da8d83f018adec042de00cdf0c002f3..a868e620c069557d02a1306a46b99bb5371b932b 100644
|
| --- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
|
| +++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
|
| @@ -55,10 +55,10 @@
|
| } // namespace
|
|
|
| ServiceWorkerRegistrationNotifications::ServiceWorkerRegistrationNotifications(
|
| - ServiceWorkerRegistration& registration,
|
| - ExecutionContext* executionContext)
|
| - : Supplement<ServiceWorkerRegistration>(registration),
|
| - ContextLifecycleObserver(executionContext) {}
|
| + ExecutionContext* executionContext,
|
| + ServiceWorkerRegistration* registration)
|
| + : ContextLifecycleObserver(executionContext),
|
| + m_registration(registration) {}
|
|
|
| ScriptPromise ServiceWorkerRegistrationNotifications::showNotification(
|
| ScriptState* scriptState,
|
| @@ -142,6 +142,7 @@
|
| }
|
|
|
| DEFINE_TRACE(ServiceWorkerRegistrationNotifications) {
|
| + visitor->trace(m_registration);
|
| visitor->trace(m_loaders);
|
| Supplement<ServiceWorkerRegistration>::trace(visitor);
|
| ContextLifecycleObserver::trace(visitor);
|
| @@ -160,8 +161,8 @@
|
| Supplement<ServiceWorkerRegistration>::from(registration,
|
| supplementName()));
|
| if (!supplement) {
|
| - supplement = new ServiceWorkerRegistrationNotifications(registration,
|
| - executionContext);
|
| + supplement = new ServiceWorkerRegistrationNotifications(executionContext,
|
| + ®istration);
|
| provideTo(registration, supplementName(), supplement);
|
| }
|
| return *supplement;
|
| @@ -192,7 +193,7 @@
|
|
|
| notificationManager->showPersistent(
|
| WebSecurityOrigin(origin.get()), data, loader->getResources(),
|
| - supplementable()->webRegistration(), std::move(callbacks));
|
| + m_registration->webRegistration(), std::move(callbacks));
|
| m_loaders.remove(loader);
|
| }
|
|
|
|
|