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

Unified Diff: net/ssl/server_bound_cert_service_unittest.cc

Issue 22702003: Fix leak of sequenced worker pool in unit tests when service_ is replaced. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use PostTask Created 7 years, 4 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: net/ssl/server_bound_cert_service_unittest.cc
diff --git a/net/ssl/server_bound_cert_service_unittest.cc b/net/ssl/server_bound_cert_service_unittest.cc
index 0063f496036854c4c3a1ae2be4cbc1dea394ae66..d7b8553b5ac1470dbbe50f905432d066d51f2f4f 100644
--- a/net/ssl/server_bound_cert_service_unittest.cc
+++ b/net/ssl/server_bound_cert_service_unittest.cc
@@ -105,7 +105,13 @@ MockServerBoundCertStoreWithAsyncGet::CallGetServerBoundCertCallbackWithResult(
const std::string& cert) {
if (err == OK)
cert_count_ = 1;
- callback_.Run(err, server_identifier_, expiration_time, private_key, cert);
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(callback_,
+ err,
+ server_identifier_,
+ expiration_time,
+ private_key,
+ cert));
}
TEST_F(ServerBoundCertServiceTest, GetDomainForHost) {
« 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