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

Issue 6691044: Encourage reliability of code using browser thread. (Closed)

Created:
9 years, 8 months ago by dmac
Modified:
9 years, 7 months ago
Reviewers:
dmac, jam
CC:
chromium-reviews
Visibility:
Public.

Description

Encourage 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -1 line) Patch
M content/browser/browser_thread.h View 1 2 3 4 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
dmac
PTAL
9 years, 8 months ago (2011-04-04 20:48:39 UTC) #1
jam
I don't think we want WARN_UNUSED_RESULT for PostTask/DeleteSoon etc. The return code is somewhat misleading, ...
9 years, 8 months ago (2011-04-04 23:50:51 UTC) #2
dmac
Are you ok though with the DLOG in DeleteOnThread::Destruct? That's the important thing that would've ...
9 years, 8 months ago (2011-04-05 00:34:33 UTC) #3
jam
On Mon, Apr 4, 2011 at 5:34 PM, <dmaclach@chromium.org> wrote: > Are you ok though ...
9 years, 8 months ago (2011-04-05 00:36:57 UTC) #4
dmaclach1
DLOG(FATAL) does crash in debug builds, but I think everytime it does crash it's indicating ...
9 years, 8 months ago (2011-04-05 03:21:49 UTC) #5
jam
On Mon, Apr 4, 2011 at 8:21 PM, David Maclachlan <dmaclach@google.com>wrote: > DLOG(FATAL) does crash ...
9 years, 8 months ago (2011-04-05 04:43:59 UTC) #6
dmac
On 2011/04/05 04:43:59, John Abd-El-Malek wrote: > On Mon, Apr 4, 2011 at 8:21 PM, ...
9 years, 8 months ago (2011-04-05 14:26:59 UTC) #7
jam
sorry to nit so much on this. I'm just worried that people will misinterpret the ...
9 years, 8 months ago (2011-04-05 17:35:28 UTC) #8
dmac
OK. Only fires under unit-testing now, and doesn't log FATAL as that causes issues with ...
9 years, 8 months ago (2011-04-05 19:31:49 UTC) #9
jam
9 years, 8 months ago (2011-04-05 20:25:17 UTC) #10
lgtm

Powered by Google App Engine
This is Rietveld 408576698