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

Unified Diff: chrome/browser/chrome_quota_permission_context.cc

Issue 10948002: Make quota requests from background pages not crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/chrome_quota_permission_context.cc
diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc
index 8c7c6d5ad081be538a4934e2c22e7c885d4ee172..47b8b3560e904f7615ba9a23f83aa4d55c8b6754 100644
--- a/chrome/browser/chrome_quota_permission_context.cc
+++ b/chrome/browser/chrome_quota_permission_context.cc
@@ -138,7 +138,8 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
}
TabContents* tab_contents = TabContents::FromWebContents(web_contents);
- InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper();
+ InfoBarTabHelper* infobar_helper =
+ tab_contents ? tab_contents->infobar_tab_helper() : NULL;
kinuko 2012/09/18 05:03:35 nit: indent
tzik 2012/09/19 12:08:54 Thanks. I fixed it and my .emacs.
if (!infobar_helper) {
// The tab has no infobar helper.
LOG(WARNING) << "Attempt to request quota from a background page: "
« 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