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

Unified Diff: base/test/sequenced_worker_pool_owner.cc

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 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: base/test/sequenced_worker_pool_owner.cc
diff --git a/base/test/sequenced_worker_pool_owner.cc b/base/test/sequenced_worker_pool_owner.cc
index f6a0d013011b0b12049ab0a59b3785fc725ced60..4486323344219db6e344ebe8135bd4ae8e922e5b 100644
--- a/base/test/sequenced_worker_pool_owner.cc
+++ b/base/test/sequenced_worker_pool_owner.cc
@@ -43,6 +43,9 @@ void SequencedWorkerPoolOwner::OnHasWork() {
void SequencedWorkerPoolOwner::WillWaitForShutdown() {
if (!will_wait_for_shutdown_callback_.is_null()) {
will_wait_for_shutdown_callback_.Run();
+
+ // Release the reference to the callback to prevent retain cycles.
+ will_wait_for_shutdown_callback_ = Closure();
}
}

Powered by Google App Engine
This is Rietveld 408576698