Chromium Code Reviews| Index: extensions/browser/extension_navigation_throttle.cc |
| diff --git a/extensions/browser/extension_navigation_throttle.cc b/extensions/browser/extension_navigation_throttle.cc |
| index 3c63dd76bf152bc75bef182b82b3a6b1fd2b09ca..235c779cafb7aa859eef19f844940fe92ac57c7d 100644 |
| --- a/extensions/browser/extension_navigation_throttle.cc |
| +++ b/extensions/browser/extension_navigation_throttle.cc |
| @@ -78,9 +78,14 @@ ExtensionNavigationThrottle::WillStartRequest() { |
| std::string resource_path = navigation_handle()->GetURL().path(); |
| ExtensionRegistry* registry = ExtensionRegistry::Get( |
| navigation_handle()->GetWebContents()->GetBrowserContext()); |
| + if (!registry) |
| + return content::NavigationThrottle::BLOCK_REQUEST; |
|
asargent_no_longer_on_chrome
2016/06/08 18:30:13
Off the top of my head I can't think of situations
|
| + |
| const extensions::Extension* extension = |
| registry->enabled_extensions().GetByID( |
| navigation_handle()->GetURL().host()); |
| + if (!extension) |
| + return content::NavigationThrottle::BLOCK_REQUEST; |
| if (WebAccessibleResourcesInfo::IsResourceWebAccessible(extension, |
| resource_path)) { |