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

Issue 2833973003: Initialize FontConfigIPC when zygote is disabled so font fallback works. (Closed)

Created:
3 years, 8 months ago by zoeclifford
Modified:
3 years, 7 months ago
CC:
Sami, chromium-reviews, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, mlamouri+watch-content_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Initialize FontConfigIPC when zygote is disabled so font fallback works. Normally FontConfigIPC is set from zygote_main_linux, but this can't happen if zygote is disabled, either from the --no-zygote flag or the --renderer-cmd-prefix flag. This is a problem because the renderer's font code uses the linux sandbox IPC logic even if --no-sandbox is set. This code mostly works but fallback font loading fails because when FontConfigIPC isn't set, SkFontConfigInterfaceDirect is used instead, and it doesn't know how to deal with fontconfiginterfaceids. This causes the last resort fallback font to always be chosen, even when a more appropriate font is available. To fix this, simply initialize FontConfigIPC even when zygote is disabled. This lets the existing code work, and allows fallback fonts to be loaded. Manually tested with the test-case in http://crbug.com/712779 BUG=712779 Review-Url: https://codereview.chromium.org/2833973003 Cr-Commit-Position: refs/heads/master@{#472553} Committed: https://chromium.googlesource.com/chromium/src/+/525974cdba654d1611d169a34397304334797175

Patch Set 1 #

Patch Set 2 : Also check for --renderer-cmd-prefix #

Total comments: 1

Patch Set 3 : Add browser test. #

Total comments: 1

Patch Set 4 : Fix uchar header include. add curly braces. #

Patch Set 5 : Fix BUILD.gn dependency issue. #

Patch Set 6 : Make test TSan clean. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -1 line) Patch
A content/browser/linux_ipc_browsertest.cc View 1 2 3 4 5 1 chunk +102 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/sandbox_ipc_linux.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/renderer_host/sandbox_ipc_linux.cc View 1 2 3 4 chunks +15 lines, -0 lines 0 comments Download
M content/renderer/renderer_main.cc View 2 chunks +15 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
A content/test/data/font/font_fallback.html View 1 2 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (24 generated)
Sami
Dmitry, would you be willing to review this small startup change?
3 years, 7 months ago (2017-04-27 18:15:47 UTC) #4
dgozman
I'm definitely not the best reviewer. Over to jam@.
3 years, 7 months ago (2017-04-27 19:49:21 UTC) #6
zoeclifford
Making sure this was actually sent out for review.
3 years, 7 months ago (2017-05-04 20:53:18 UTC) #7
jam
can you add a test for this? https://codereview.chromium.org/2833973003/diff/20001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/2833973003/diff/20001/content/browser/renderer_host/render_process_host_impl.cc#newcode1657 content/browser/renderer_host/render_process_host_impl.cc:1657: // A ...
3 years, 7 months ago (2017-05-05 00:21:22 UTC) #8
zoeclifford
On 2017/05/05 00:21:22, jam wrote: > can you add a test for this? Any ideas ...
3 years, 7 months ago (2017-05-05 21:35:48 UTC) #9
jam
On 2017/05/05 21:35:48, zoeclifford wrote: > On 2017/05/05 00:21:22, jam wrote: > > can you ...
3 years, 7 months ago (2017-05-05 22:25:43 UTC) #10
zoeclifford
On 2017/05/05 22:25:43, jam wrote: > On 2017/05/05 21:35:48, zoeclifford wrote: > > On 2017/05/05 ...
3 years, 7 months ago (2017-05-05 22:28:50 UTC) #11
jam
On 2017/05/05 22:28:50, zoeclifford wrote: > On 2017/05/05 22:25:43, jam wrote: > > On 2017/05/05 ...
3 years, 7 months ago (2017-05-09 15:12:38 UTC) #12
jam
On 2017/05/05 22:28:50, zoeclifford wrote: > On 2017/05/05 22:25:43, jam wrote: > > On 2017/05/05 ...
3 years, 7 months ago (2017-05-09 15:12:40 UTC) #13
zoeclifford
On 2017/05/09 15:12:40, jam wrote: > On 2017/05/05 22:28:50, zoeclifford wrote: > > On 2017/05/05 ...
3 years, 7 months ago (2017-05-09 22:05:54 UTC) #14
jam
On 2017/05/09 22:05:54, zoeclifford wrote: > On 2017/05/09 15:12:40, jam wrote: > > On 2017/05/05 ...
3 years, 7 months ago (2017-05-10 00:09:13 UTC) #15
Sami
+linux sandboxing owners My non-owner opinion is that refactoring SandboxIPCHandler to be more testable is ...
3 years, 7 months ago (2017-05-10 11:05:19 UTC) #17
zoeclifford
On 2017/05/10 11:05:19, Sami wrote: > +linux sandboxing owners > > My non-owner opinion is ...
3 years, 7 months ago (2017-05-12 18:22:28 UTC) #18
Sami
Non-owner lgtm, thanks for adding the test! https://codereview.chromium.org/2833973003/diff/40001/content/browser/renderer_host/sandbox_ipc_linux.cc File content/browser/renderer_host/sandbox_ipc_linux.cc (right): https://codereview.chromium.org/2833973003/diff/40001/content/browser/renderer_host/sandbox_ipc_linux.cc#newcode263 content/browser/renderer_host/sandbox_ipc_linux.cc:263: if (g_test_observer) ...
3 years, 7 months ago (2017-05-15 11:14:37 UTC) #19
jam
lgtm
3 years, 7 months ago (2017-05-15 14:00:34 UTC) #20
zoeclifford
On 2017/05/15 11:14:37, Sami wrote: > Non-owner lgtm, thanks for adding the test! > > ...
3 years, 7 months ago (2017-05-15 19:19:48 UTC) #21
Jorge Lucangeli Obes
sandbox_ipc_linux lgtm
3 years, 7 months ago (2017-05-16 14:56:05 UTC) #23
zoeclifford
On 2017/05/16 14:56:05, Jorge Lucangeli Obes wrote: > sandbox_ipc_linux lgtm I had to modify the ...
3 years, 7 months ago (2017-05-17 17:40:49 UTC) #34
Jorge Lucangeli Obes (Google)
PS6 looks reasonable to me. lgtm
3 years, 7 months ago (2017-05-17 20:16:13 UTC) #38
Jorge Lucangeli Obes
Sorry, I keep replying from my @google address. lgtm
3 years, 7 months ago (2017-05-17 20:16:54 UTC) #39
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/2833973003/100001
3 years, 7 months ago (2017-05-17 20:18:39 UTC) #43
commit-bot: I haz the power
3 years, 7 months ago (2017-05-17 20:31:23 UTC) #46
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/525974cdba654d1611d169a34397...

Powered by Google App Engine
This is Rietveld 408576698