From 357e0fb21ceae8c2659f2d77ad152604a2540713 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 29 May 2015 08:30:08 -0700 Subject: [PATCH] Temporarily add a CHECK() in the PushMessagingDispatcher. We're seeing a few crashes in regards to responses (both successful and unsuccessful ones) to push subscriptions from documents where the associated callbacks cannot be located anymore. The CHECK() will give us slightly more context about what's going on in triaging this. BUG=492720 Review URL: https://codereview.chromium.org/1154013008 Cr-Commit-Position: refs/heads/master@{#331976} --- content/renderer/push_messaging/push_messaging_dispatcher.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/content/renderer/push_messaging/push_messaging_dispatcher.cc b/content/renderer/push_messaging/push_messaging_dispatcher.cc index 499598681d19..8d1f13714e11 100644 --- a/content/renderer/push_messaging/push_messaging_dispatcher.cc +++ b/content/renderer/push_messaging/push_messaging_dispatcher.cc @@ -110,7 +110,9 @@ void PushMessagingDispatcher::OnSubscribeFromDocumentSuccess( const std::string& subscription_id) { blink::WebPushSubscriptionCallbacks* callbacks = subscription_callbacks_.Lookup(request_id); - DCHECK(callbacks); + + // TODO(peter): Change this back to a DCHECK before M45 branches. + CHECK(callbacks) << "Invalid request id received: " << request_id; scoped_ptr subscription( new blink::WebPushSubscription( @@ -126,7 +128,9 @@ void PushMessagingDispatcher::OnSubscribeFromDocumentError( PushRegistrationStatus status) { blink::WebPushSubscriptionCallbacks* callbacks = subscription_callbacks_.Lookup(request_id); - DCHECK(callbacks); + + // TODO(peter): Change this back to a DCHECK before M45 branches. + CHECK(callbacks) << "Invalid request id received: " << request_id; scoped_ptr error(new blink::WebPushError( blink::WebPushError::ErrorTypeAbort, -- 2.11.4.GIT