summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc5
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc10
2 files changed, 10 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 75b6ddc..8c8754d 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -39,7 +39,10 @@ RenderViewHostDelegateViewHelper::MaybeCreateBackgroundContents(
const string16& frame_name) {
ExtensionsService* extensions_service = profile->GetExtensionsService();
- if (!opener_url.is_valid() || frame_name.empty())
+ if (!opener_url.is_valid() ||
+ frame_name.empty() ||
+ !extensions_service ||
+ !extensions_service->is_ready())
return NULL;
const Extension* extension =
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 979b40b..5f091ee 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -598,10 +598,12 @@ void TabContents::SetExtensionAppById(const std::string& extension_app_id) {
return;
ExtensionsService* extension_service = profile()->GetExtensionsService();
- const Extension* extension =
- extension_service->GetExtensionById(extension_app_id, false);
- if (extension)
- SetExtensionApp(extension);
+ if (extension_service && extension_service->is_ready()) {
+ const Extension* extension =
+ extension_service->GetExtensionById(extension_app_id, false);
+ if (extension)
+ SetExtensionApp(extension);
+ }
}
SkBitmap* TabContents::GetExtensionAppIcon() {