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

Unified Diff: chrome/browser/renderer_host/chrome_render_view_host_observer.cc

Issue 8496024: Don't close crashed tabs from extensions with background pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mpcomplete's Created 9 years, 1 month 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 | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_render_view_host_observer.cc
diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
index 586ecdab8e907750bb0fc7323156cd2355f8b47c..cb924d3b6b035ffe2eaaf658f3879f7af9d0e5d0 100644
--- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
+++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
@@ -139,7 +139,15 @@ const Extension* ChromeRenderViewHostObserver::GetExtension() {
if (!service)
return NULL;
- // May be null if somebody typos a chrome-extension:// URL.
+ // Reload the extension if it has crashed.
+ // TODO(yoz): This reload doesn't happen synchronously for unpacked
+ // extensions. It seems to be fast enough, but there is a race.
+ // We should delay loading until the extension has reloaded.
+ if (service->GetTerminatedExtension(site.host()))
+ service->ReloadExtension(site.host());
+
+ // May be null if the extension doesn't exist, for example if somebody typos
+ // a chrome-extension:// URL.
return service->GetExtensionByURL(site);
}
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698