Commit 2bb0feb0 authored by mlamouri's avatar mlamouri Committed by Commit bot

It is possible to sometimes have a null PermissionBubbleManager.

BUG=457091

Review URL: https://codereview.chromium.org/1023213002

Cr-Commit-Position: refs/heads/master@{#321812}
parent 6f487af2
...@@ -125,7 +125,10 @@ void PermissionContextBase::DecidePermission( ...@@ -125,7 +125,10 @@ void PermissionContextBase::DecidePermission(
return; return;
PermissionBubbleManager* bubble_manager = PermissionBubbleManager* bubble_manager =
PermissionBubbleManager::FromWebContents(web_contents); PermissionBubbleManager::FromWebContents(web_contents);
DCHECK(bubble_manager); // TODO(mlamouri): sometimes |bubble_manager| is null. This check is meant
// to prevent crashes. See bug 457091.
if (!bubble_manager)
return;
scoped_ptr<PermissionBubbleRequest> request_ptr( scoped_ptr<PermissionBubbleRequest> request_ptr(
new PermissionBubbleRequestImpl( new PermissionBubbleRequestImpl(
requesting_origin, user_gesture, permission_type_, requesting_origin, user_gesture, permission_type_,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment