DescriptionEncourage reliability of code using browser thread.
I had a leak that occurred because the return value from DeleteSoon was not being checked. It looked like this:
{
scoped_ptr<AThing> foo = new AThing;
BrowserThread browser_ui_thread(BrowserThread::UI, &loop);
....
}
Turned out the leak occurred because AThing was set to only delete itself on a UI browser thread, but browser_ui_thread was going out of scope
before delete was being called. Adding the DLOG to DeleteSoon helps expose these errors.
BUG=NONE
TEST=BUILD
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80524
Patch Set 1 #Patch Set 2 : Fixed up based on jam's comments #Patch Set 3 : undo changes to importer_list #Patch Set 4 : Make log fire under unit tests only #Patch Set 5 : Make logging include conditional #Patch Set 6 : Turn off fatal as it caused problem in tests #Messages
Total messages: 10 (0 generated)
|