Skip to content

Conversation

@nornagon
Copy link
Contributor

@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 a team as a code owner April 6, 2020 19:26
@nornagon nornagon added the 7-2-x label Apr 6, 2020
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Apr 6, 2020
@nornagon nornagon added the backport-check-skip Skip trop's backport validity checking label Apr 6, 2020
@nornagon nornagon requested a review from a team April 7, 2020 18:08
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Apr 7, 2020
@nornagon
Copy link
Contributor Author

nornagon commented Apr 9, 2020

CI failures unrelated; merging.

@nornagon nornagon merged commit 3cb2484 into 7-2-x Apr 9, 2020
@release-clerk
Copy link

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 April 9, 2020 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7-2-x backport-check-skip Skip trop's backport validity checking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants