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

Issue 2699403003: Avoid touching fonts in ResourceBundle while reloading locale (Closed)

Created:
3 years, 10 months ago by tzik
Modified:
3 years, 10 months ago
Reviewers:
oshima, sky
CC:
chromium-reviews, oshima+watch_chromium.org, davemoore+watch_chromium.org, Robert Sesek, Yuki, sky
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid touching fonts in ResourceBundle while reloading locale gfx::Font is not thread safe due to non-thread-safe ref counts in gfx::PlatformFont and gfx::FontListImpl, and ui::ResouceBundle doesn't protect them from data race. So, we should not touch them only on UI thread to avoid the race on the ref count manipulation. BUG=688072, 468010

Patch Set 1 #

Total comments: 2

Patch Set 2 : +comment. rebase. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M chrome/browser/chromeos/base/locale_util.cc View 1 2 chunks +4 lines, -2 lines 1 comment Download

Dependent Patchsets:

Messages

Total messages: 22 (15 generated)
tzik
PTAL
3 years, 10 months ago (2017-02-20 09:28:00 UTC) #5
oshima
lgtm with a nit https://codereview.chromium.org/2699403003/diff/1/chrome/browser/chromeos/base/locale_util.cc File chrome/browser/chromeos/base/locale_util.cc (right): https://codereview.chromium.org/2699403003/diff/1/chrome/browser/chromeos/base/locale_util.cc#newcode94 chrome/browser/chromeos/base/locale_util.cc:94: Please add comment that this ...
3 years, 10 months ago (2017-02-21 00:24:05 UTC) #10
tzik
https://codereview.chromium.org/2699403003/diff/1/chrome/browser/chromeos/base/locale_util.cc File chrome/browser/chromeos/base/locale_util.cc (right): https://codereview.chromium.org/2699403003/diff/1/chrome/browser/chromeos/base/locale_util.cc#newcode94 chrome/browser/chromeos/base/locale_util.cc:94: On 2017/02/21 00:24:05, oshima wrote: > Please add comment ...
3 years, 10 months ago (2017-02-21 04:25:48 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2699403003/40001
3 years, 10 months ago (2017-02-21 04:26:06 UTC) #14
commit-bot: I haz the power
Prior attempt to commit was detected, but we were not able to check whether the ...
3 years, 10 months ago (2017-02-21 05:06:17 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2699403003/40001
3 years, 10 months ago (2017-02-21 05:10:34 UTC) #19
sky
3 years, 10 months ago (2017-02-21 17:51:06 UTC) #22
Message was sent while issue was closed.
https://codereview.chromium.org/2699403003/diff/40001/chrome/browser/chromeos...
File chrome/browser/chromeos/base/locale_util.cc (right):

https://codereview.chromium.org/2699403003/diff/40001/chrome/browser/chromeos...
chrome/browser/chromeos/base/locale_util.cc:97:
ResourceBundle::GetSharedInstance().ReloadFonts();
Could you make ReloadFonts DCHECK it's on the main thread?

Powered by Google App Engine
This is Rietveld 408576698