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

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

Issue 2348633002: Make sure to to check weak ptr validity before use in UnpackedInstaller (Closed)
Patch Set: Created 4 years, 3 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index 0f29e6c2fbb805cefaa8de399a4816bd0ab5f8a4..f37728ac3d4859cdca9b0d1cc8a6963056bd81c0 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -369,6 +369,9 @@ void UnpackedInstaller::ReportExtensionLoadError(const std::string &error) {
void UnpackedInstaller::InstallExtension() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ if (!service_weak_.get())
lazyboy 2016/09/15 21:45:09 Should we also Reset |callback_|?
asargent_no_longer_on_chrome 2016/09/16 00:03:24 Good suggestion. Done.
+ return;
+
PermissionsUpdater perms_updater(service_weak_->profile());
perms_updater.InitializePermissions(extension());
perms_updater.GrantActivePermissions(extension());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698