| Index: content/renderer/push_messaging/push_messaging_dispatcher.cc
|
| diff --git a/content/renderer/push_messaging/push_messaging_dispatcher.cc b/content/renderer/push_messaging/push_messaging_dispatcher.cc
|
| index c1b6b381e2f447721c3f1a859277bc550dbe9e1e..cbb7d2308878f37a27fe5d6ae35241a7cc180de6 100644
|
| --- a/content/renderer/push_messaging/push_messaging_dispatcher.cc
|
| +++ b/content/renderer/push_messaging/push_messaging_dispatcher.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "content/renderer/push_messaging/push_messaging_dispatcher.h"
|
|
|
| +#include <memory>
|
| +
|
| #include "base/memory/ptr_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "content/child/push_messaging/push_provider.h"
|
| @@ -78,7 +80,8 @@ void PushMessagingDispatcher::DidGetManifest(
|
| // Get the sender_info from the manifest since it wasn't provided by
|
| // the caller.
|
| if (manifest.IsEmpty()) {
|
| - int request_id = subscription_callbacks_.Add(callbacks);
|
| + int request_id = subscription_callbacks_.Add(
|
| + std::unique_ptr<blink::WebPushSubscriptionCallbacks>(callbacks));
|
| OnSubscribeFromDocumentError(
|
| request_id, PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING);
|
| return;
|
| @@ -98,7 +101,8 @@ void PushMessagingDispatcher::DoSubscribe(
|
| blink::WebServiceWorkerRegistration* service_worker_registration,
|
| const PushSubscriptionOptions& options,
|
| blink::WebPushSubscriptionCallbacks* callbacks) {
|
| - int request_id = subscription_callbacks_.Add(callbacks);
|
| + int request_id = subscription_callbacks_.Add(
|
| + std::unique_ptr<blink::WebPushSubscriptionCallbacks>(callbacks));
|
| int64_t service_worker_registration_id =
|
| static_cast<WebServiceWorkerRegistrationImpl*>(
|
| service_worker_registration)
|
|
|