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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ppontes
approved these changes
Apr 7, 2020
deepak1556
requested changes
Apr 8, 2020
patches/chromium/reland_sequentialise_access_to_callbacks_in.patch
Outdated
Show resolved
Hide resolved
deepak1556
reviewed
Apr 8, 2020
deepak1556
approved these changes
Apr 8, 2020
CI failures unrelated; merging. |
Release Notes Persisted
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.