| 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);
|
| }
|
|
|
|
|