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

Unified Diff: components/test_runner/test_runner.cc

Issue 1886763002: Fix crash when AppBannerClient is null when resolveBeforeInstallPromptPromise is called. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no-find-copies Created 4 years, 8 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 | third_party/WebKit/LayoutTests/app_banner/testrunner-resolve-crash.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 9f79dbbd68279633999e4604991fb9e4855d8bec..ae1fb6b6cbe8be3af9109033b8afb051d756202d 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -2958,6 +2958,8 @@ void TestRunner::DispatchBeforeInstallPromptEvent(
void TestRunner::ResolveBeforeInstallPromptPromise(
int request_id,
const std::string& platform) {
+ if (!test_interfaces_->GetAppBannerClient())
+ return;
test_interfaces_->GetAppBannerClient()->ResolvePromise(request_id, platform);
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/app_banner/testrunner-resolve-crash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698