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

Issue 9696034: Avoid creating BrowserThreadGlobals when we don't need to. (Closed)

Created:
8 years, 9 months ago by joth
Modified:
8 years, 9 months ago
Reviewers:
brettw, akalin
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, trchen
Visibility:
Public.

Description

Avoid creating BrowserThreadGlobals when we don't need to. In tessts, it is possible for BrowserThread static methods like IsWellKnownThread to get called when no message loops exists. We can infer the answer for many methods from the fact the globals are NULL without having to construct them. (constructing them can have the undesireable side effect in these cases of hitting DCHECK for MessageLoop::current() in the SequencedWorkerPool constructor) BUG=117940 TEST=out/Debug/unit_tests --gtest_filter=TemplateURLPrepopulateDataTest.ProvidersFromPrefs Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126626

Patch Set 1 #

Patch Set 2 : whitespace #

Patch Set 3 : revert d'tor changes, as globals are sure to exist already here #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -0 lines) Patch
M content/browser/browser_thread_impl.cc View 1 2 4 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
joth
8 years, 9 months ago (2012-03-13 13:33:35 UTC) #1
brettw
lgtm
8 years, 9 months ago (2012-03-13 16:31:22 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joth@chromium.org/9696034/2002
8 years, 9 months ago (2012-03-13 16:37:35 UTC) #3
akalin
On 2012/03/13 16:37:35, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
8 years, 9 months ago (2012-03-13 16:42:31 UTC) #4
commit-bot: I haz the power
Try job failure for 9696034-2002 (retry) (retry) on win_rel for step "browser_tests". It's a second ...
8 years, 9 months ago (2012-03-13 21:35:24 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joth@chromium.org/9696034/2002
8 years, 9 months ago (2012-03-14 09:41:00 UTC) #6
commit-bot: I haz the power
8 years, 9 months ago (2012-03-14 11:57:51 UTC) #7
Change committed as 126626

Powered by Google App Engine
This is Rietveld 408576698