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

Unified Diff: chrome/browser/android/webapk/webapk_installer.cc

Issue 2409453002: Fix crash on WebAPK startup (Closed)
Patch Set: Merge branch 'master' into startup_crash0 Created 4 years, 2 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
Index: chrome/browser/android/webapk/webapk_installer.cc
diff --git a/chrome/browser/android/webapk/webapk_installer.cc b/chrome/browser/android/webapk/webapk_installer.cc
index 403297873b469a9e96ed2854038716e31e891f71..82c0c4776a1323df8d5ffcbe129e96209886a107 100644
--- a/chrome/browser/android/webapk/webapk_installer.cc
+++ b/chrome/browser/android/webapk/webapk_installer.cc
@@ -485,14 +485,11 @@ void WebApkInstaller::OnTimeout() {
}
void WebApkInstaller::OnSuccess() {
- FinishCallback callback = finish_callback_;
- std::string webapk_package = webapk_package_;
+ finish_callback_.Run(true, webapk_package_);
delete this;
- callback.Run(true, webapk_package);
}
void WebApkInstaller::OnFailure() {
- FinishCallback callback = finish_callback_;
+ finish_callback_.Run(false, webapk_package_);
delete this;
- callback.Run(false, "");
}

Powered by Google App Engine
This is Rietveld 408576698