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

Unified Diff: chrome/browser/background_contents_service.cc

Issue 7012031: Fix a couple of crashes related to app-crashed balloon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ;; Created 9 years, 7 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/background_contents_service.cc
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc
index 1c22b5195572e004c465980f2c6ab9ea23c160f3..46a5f07a79a8f940d3b1b1e6ac7e02826f6d623d 100644
--- a/chrome/browser/background_contents_service.cc
+++ b/chrome/browser/background_contents_service.cc
@@ -229,7 +229,7 @@ void BackgroundContentsService::Observe(NotificationType type,
if (extension && extension->background_url().is_valid())
break;
}
- RegisterBackgroundContents(Details<BackgroundContents>(details).ptr());
+ RegisterBackgroundContents(bgcontents);
break;
}
case NotificationType::EXTENSION_LOADED: {
@@ -387,9 +387,10 @@ void BackgroundContentsService::LoadBackgroundContentsFromDictionary(
DCHECK(extensions_service);
DictionaryValue* dict;
- contents->GetDictionaryWithoutPathExpansion(extension_id, &dict);
- if (dict == NULL)
+ if (!contents->GetDictionaryWithoutPathExpansion(extension_id, &dict) ||
+ dict == NULL)
return;
+
string16 frame_name;
std::string url;
dict->GetString(kUrlKey, &url);
@@ -518,6 +519,8 @@ void BackgroundContentsService::BackgroundContentsOpened(
DCHECK(!details->application_id.empty());
contents_map_[details->application_id].contents = details->contents;
contents_map_[details->application_id].frame_name = details->frame_name;
+
+ ScheduleCloseBalloon(UTF16ToASCII(details->application_id));
}
// Used by test code and debug checks to verify whether a given
« 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