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

Unified Diff: chrome/browser/extensions/chrome_test_extension_loader.cc

Issue 2536903002: [Extensions WebUI] Clean up ExtensionSettingsUIBrowserTest (Closed)
Patch Set: rebase Created 4 years 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 | chrome/browser/ui/webui/extensions/extension_settings_browsertest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/chrome_test_extension_loader.cc
diff --git a/chrome/browser/extensions/chrome_test_extension_loader.cc b/chrome/browser/extensions/chrome_test_extension_loader.cc
index 9a44002da73f6e6dd3e89fc020a1d3c8532a8545..f4c04bbc91b8d880be4931277528d650d543f5b3 100644
--- a/chrome/browser/extensions/chrome_test_extension_loader.cc
+++ b/chrome/browser/extensions/chrome_test_extension_loader.cc
@@ -57,8 +57,14 @@ scoped_refptr<const Extension> ChromeTestExtensionLoader::LoadExtension(
return nullptr;
extension_id_ = extension->id();
- extension = nullptr;
- CheckPermissions(extension_id_);
+ // Trying to reload a shared module (as we do when adjusting extension
+ // permissions) causes ExtensionService to crash. Only adjust permissions for
+ // non-shared modules.
+ // TODO(devlin): That's not good; we shouldn't be crashing.
+ if (!SharedModuleInfo::IsSharedModule(extension.get())) {
+ extension = nullptr;
+ CheckPermissions(extension_id_);
+ }
if (!install_param_.empty()) {
ExtensionPrefs::Get(browser_context_)
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_browsertest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698