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

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

Issue 2669563003: Fix rare crash in WebstoreInlineInstaller::CheckInlineInstallPermitted. (Closed)
Patch Set: Move check to CheckRequestorAlive. Created 3 years, 10 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/webstore_inline_installer.cc
diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc
index 38931a3a35395b9415c522f708252523cc06b337..f58807993aab01e5fd7871c04dffdd0a0a385370 100644
--- a/chrome/browser/extensions/webstore_inline_installer.cc
+++ b/chrome/browser/extensions/webstore_inline_installer.cc
@@ -138,7 +138,8 @@ std::string WebstoreInlineInstaller::GetJsonPostData() {
bool WebstoreInlineInstaller::CheckRequestorAlive() const {
// The frame or tab may have gone away - cancel installation in that case.
- return host_ != nullptr && web_contents() != nullptr;
+ return host_ != nullptr && web_contents() != nullptr &&
+ chrome::FindBrowserWithWebContents(web_contents()) != nullptr;
}
const GURL& WebstoreInlineInstaller::GetRequestorURL() const {
« 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