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

Unified Diff: chrome/browser/content_settings/permission_context_base.cc

Issue 1023213002: It is possible to sometimes have a null PermissionBubbleManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove dcheck Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/permission_context_base.cc
diff --git a/chrome/browser/content_settings/permission_context_base.cc b/chrome/browser/content_settings/permission_context_base.cc
index 711dbe57a09b6f0a38cca6bb4c49ef6074f62c55..8868965621f48d828be8e6e27fc5847e524ba4ba 100644
--- a/chrome/browser/content_settings/permission_context_base.cc
+++ b/chrome/browser/content_settings/permission_context_base.cc
@@ -125,7 +125,10 @@ void PermissionContextBase::DecidePermission(
return;
PermissionBubbleManager* bubble_manager =
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(
new PermissionBubbleRequestImpl(
requesting_origin, user_gesture, permission_type_,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698