Status: Untriaged Owner: ---- CC: da...@chromium.org, j...@chromium.org Labels: Type-Cleanup Pri-2 OS-All Area-Misc
New issue 8820 by erik...@chromium.org: remove unneeded RunAllPending calls in unit tests http://code.google.com/p/chromium/issues/detail?id=8820 We should remove unecessary calls to RunAllPending in unit tests. Any pending task that hasn't been run when a MessageLoop is shut down are leaked in the general case. In many cases, these leaks were benign, but due to their variable nature, they were a pain to try to maintain in exception lists. In order to avoid these leaks, we began to liberally sprinkle calls to RunAllPending into the tests, which would cause all of the pending tasks to be run, thus avoiding the leaks. Due to the recent fix to bug 6532, MessageLoop now deletes pending tasks at shutdown in purify builds (#ifdef PURIFY). There's a pending TODO in the code to remove the #ifdef once some safety issues have been resolved. In theory, this means that we could remove a bunch of the RunAllPending calls. Two issues that prevent us from just doing a search and replace here: - The current #ifdef PURIFY mode doesn't help valgrind, which should have the same issue. Valgrind builders currently just use the normal Debug build, so there's no #ifdef to switch off of. - Some of the RunAllPending calls are actually used intentionally to force pending code to run for the test, not just as a way to avoid leaks. These either need to be left as-is and commented, or changed in order to not use this mechanism. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ Automated mail from issue updates at http://crbug.com/ Subscription options: http://groups.google.com/group/chromium-bugs -~----------~----~----~----~------~----~------~--~---