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

Issue 355573006: Fix race condition in parallel font initialization. (Closed)

Created:
6 years, 6 months ago by Tom Hudson
Modified:
6 years, 5 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Uses optional mutex to guard construction of the singleton, which initializes the non-threadsafe libfontconfig. Without this change, Skia's parallel path ops test runner crashes 6/10 and hangs 2/10 on startup; with this change, 0/10 problems. BUG=skia:2693 R=mtklein@google.com,bungeman@google.com Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8 Committed: https://skia.googlesource.com/skia/+/60b08a0adfe73f593af62c8d3f55958438360e1b Committed: https://skia.googlesource.com/skia/+/e438ddbc7451ec80f953266409fea4695e78c8c2

Patch Set 1 #

Total comments: 7

Patch Set 2 : mtklein review #

Patch Set 3 : Get rid of SK_DECLARE_STATIC_LAZ_PTR #

Patch Set 4 : Make mutex optional #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -6 lines) Patch
M include/ports/SkFontConfigInterface.h View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M src/ports/SkFontConfigInterface_android.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/ports/SkFontConfigInterface_direct.cpp View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M src/ports/SkFontHost_fontconfig.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 24 (0 generated)
tomhudson
PTAL
6 years, 6 months ago (2014-06-26 18:35:36 UTC) #1
mtklein
https://codereview.chromium.org/355573006/diff/1/include/ports/SkFontConfigInterface.h File include/ports/SkFontConfigInterface.h (right): https://codereview.chromium.org/355573006/diff/1/include/ports/SkFontConfigInterface.h#newcode101 include/ports/SkFontConfigInterface.h:101: static SkFontConfigInterface* GetSingletonDirectInterface(SkBaseMutex& mutex); Would mildly prefer passing this ...
6 years, 6 months ago (2014-06-26 18:59:07 UTC) #2
tomhudson
Looks safe on win & mac build trybots. https://codereview.chromium.org/355573006/diff/1/include/ports/SkFontConfigInterface.h File include/ports/SkFontConfigInterface.h (right): https://codereview.chromium.org/355573006/diff/1/include/ports/SkFontConfigInterface.h#newcode101 include/ports/SkFontConfigInterface.h:101: static ...
6 years, 6 months ago (2014-06-26 21:01:52 UTC) #3
mtklein
LGTM https://codereview.chromium.org/355573006/diff/1/include/ports/SkFontConfigInterface.h File include/ports/SkFontConfigInterface.h (right): https://codereview.chromium.org/355573006/diff/1/include/ports/SkFontConfigInterface.h#newcode101 include/ports/SkFontConfigInterface.h:101: static SkFontConfigInterface* GetSingletonDirectInterface(SkBaseMutex& mutex); On 2014/06/26 21:01:52, tomhudson ...
6 years, 6 months ago (2014-06-26 21:05:31 UTC) #4
tomhudson
The CQ bit was checked by tomhudson@google.com
6 years, 6 months ago (2014-06-26 21:29:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/tomhudson@chromium.org/355573006/40001
6 years, 6 months ago (2014-06-26 21:29:57 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-26 21:30:00 UTC) #7
commit-bot: I haz the power
Presubmit check for 355573006-40001 failed and returned exit status 1. Running presubmit commit checks ...
6 years, 6 months ago (2014-06-26 21:30:00 UTC) #8
tomhudson
+Mike for public API change (to SkFontConfigInterface). Related: OtherMike: *why* did you want the SkBaseMutex ...
6 years, 5 months ago (2014-06-27 12:42:17 UTC) #9
mtklein
> Related: OtherMike: *why* did you want the SkBaseMutex to be passed by pointer > ...
6 years, 5 months ago (2014-06-27 13:41:45 UTC) #10
reed1
lgtm
6 years, 5 months ago (2014-06-30 20:57:24 UTC) #11
tomhudson
The CQ bit was checked by tomhudson@google.com
6 years, 5 months ago (2014-06-30 20:57:35 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/tomhudson@chromium.org/355573006/40001
6 years, 5 months ago (2014-06-30 20:58:31 UTC) #13
commit-bot: I haz the power
Change committed as df022f5972ae6a2a1d96d15c50eca52cade3abd8
6 years, 5 months ago (2014-06-30 21:14:04 UTC) #14
reed2
A revert of this CL has been created in https://codereview.chromium.org/365503003/ by reed@chromium.org. The reason for ...
6 years, 5 months ago (2014-06-30 23:47:47 UTC) #15
mtklein
On 2014/06/30 23:47:47, reed2 wrote: > A revert of this CL has been created in ...
6 years, 5 months ago (2014-07-01 00:14:22 UTC) #16
tomhudson
On 2014/07/01 00:14:22, mtklein wrote: > Hey now! That's my button. > > Tom was ...
6 years, 5 months ago (2014-07-01 15:04:56 UTC) #17
tomhudson
The CQ bit was checked by tomhudson@google.com
6 years, 5 months ago (2014-07-01 15:05:01 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/tomhudson@chromium.org/355573006/40001
6 years, 5 months ago (2014-07-01 15:06:09 UTC) #19
commit-bot: I haz the power
Change committed as 60b08a0adfe73f593af62c8d3f55958438360e1b
6 years, 5 months ago (2014-07-01 15:06:18 UTC) #20
mtklein
A revert of this CL has been created in https://codereview.chromium.org/354133004/ by mtklein@google.com. The reason for ...
6 years, 5 months ago (2014-07-01 20:32:49 UTC) #21
Tom Hudson
The CQ bit was checked by tomhudson@chromium.org
6 years, 5 months ago (2014-07-02 01:41:02 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/tomhudson@chromium.org/355573006/60001
6 years, 5 months ago (2014-07-02 01:41:40 UTC) #23
commit-bot: I haz the power
6 years, 5 months ago (2014-07-02 01:54:47 UTC) #24
Message was sent while issue was closed.
Change committed as e438ddbc7451ec80f953266409fea4695e78c8c2

Powered by Google App Engine
This is Rietveld 408576698