Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cherry-pick d4564dcc2520 from chromium #22979

Merged
merged 7 commits into from Apr 9, 2020

Conversation

@nornagon
Copy link
Member

@nornagon nornagon commented Apr 6, 2020

Reland: Sequentialise access to callbacks in DWriteFontLookupTableBuilder

This reland fixes the sequenced task runner initialisation. Set the
task runner in the constructor and reset it for each unit test execution.

Since there may be multiple instance of DWriteFontProxyImpl instantiated
for multiple RenderProcessHosts, and
DWriteFontProxyImpl::GetUniqueNameLookupTable may access
DWriteFontLookupTableBuilder::QueueShareMemoryRegionWhenReady from
separate threads, there may be race conditions around the
pending_callbacks_ member of DWriteFontLookupTableBuilder.

Sequentialise and guard access to pending_callbacks_ with a separate
sequenced task runner.

Remove explicit configuration of the FontUniqueNameBrowserTest cache
directory as [1] introduced a callback function in
ShellContentBrowserClient which sets this correctly. This avoids
instantiating DWriteFontLookupTableBuilder too early when the ThreadPool
is not yet available in a BrowserTest.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1776358/9/content/shell/browser/shell_content_browser_client.cc#422

Fixed: 1047054
Change-Id: I38cf8b84a48315980624b68bbf55d3727be457b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032119
Reviewed-by: Matthew Denton mpdenton@chromium.org
Commit-Queue: Dominik Röttsches drott@chromium.org
Cr-Commit-Position: refs/heads/master@{#737466}

Notes: Security: Backport fix for buffer underflow in DWrite.

@nornagon nornagon requested a review from as a code owner Apr 6, 2020
@nornagon nornagon added the 7-2-x label Apr 6, 2020
@nornagon nornagon requested a review from Apr 7, 2020
ppontes
ppontes approved these changes Apr 7, 2020
patches/chromium/.patches Outdated Show resolved Hide resolved
@nornagon
Copy link
Member Author

@nornagon nornagon commented Apr 9, 2020

CI failures unrelated; merging.

@nornagon nornagon merged commit 3cb2484 into 7-2-x Apr 9, 2020
13 of 15 checks passed
@release-clerk
Copy link

@release-clerk release-clerk bot commented Apr 9, 2020

Release Notes Persisted

Security: Backport fix for buffer underflow in DWrite.

@nornagon nornagon deleted the cherry-pick/7-2-x/chromium/d4564dcc2520 branch Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants