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

Unified Diff: third_party/libaddressinput/chromium/chrome_address_validator.cc

Issue 2950353002: [Payments] Avoid a crash caused by AddressValidatorTest. (Closed)
Patch Set: Crash if you have to. (Undo Patch Set 1.) Created 3 years, 6 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/libaddressinput/chromium/chrome_address_validator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libaddressinput/chromium/chrome_address_validator.cc
diff --git a/third_party/libaddressinput/chromium/chrome_address_validator.cc b/third_party/libaddressinput/chromium/chrome_address_validator.cc
index f76bcbd15fda6b170d7941f5f63842d5ea49afff..57cf2ab76d4c281dfe41c405b9515d923b5eb175 100644
--- a/third_party/libaddressinput/chromium/chrome_address_validator.cc
+++ b/third_party/libaddressinput/chromium/chrome_address_validator.cc
@@ -163,9 +163,11 @@ void AddressValidator::RulesLoaded(bool success,
if (success || attempts_number_[region_code] + 1 >= kMaxAttemptsNumber)
return;
+ // No need to retry if it's synchronous (which means that it's a test.)
sebsg 2017/06/29 18:45:41 Remove comment? :)
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
- FROM_HERE, base::Bind(&AddressValidator::RetryLoadRules,
- weak_factory_.GetWeakPtr(), region_code),
+ FROM_HERE,
+ base::Bind(&AddressValidator::RetryLoadRules, weak_factory_.GetWeakPtr(),
+ region_code),
GetBaseRetryPeriod() * pow(2, attempts_number_[region_code]++));
}
« no previous file with comments | « no previous file | third_party/libaddressinput/chromium/chrome_address_validator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698