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

Unified Diff: components/font_service/public/cpp/font_service_thread.cc

Issue 1925423002: font-service: Track one more pending WaitableEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/font_service/public/cpp/font_service_thread.cc
diff --git a/components/font_service/public/cpp/font_service_thread.cc b/components/font_service/public/cpp/font_service_thread.cc
index 36ca646d5595709d73309f31a5045b7a3144da08..810d2c72f6f04e5ceb700458f6aefa3b6609f4a0 100644
--- a/components/font_service/public/cpp/font_service_thread.cc
+++ b/components/font_service/public/cpp/font_service_thread.cc
@@ -104,6 +104,7 @@ void FontServiceThread::MatchFamilyNameImpl(
style->width = requested_style.width();
style->slant = static_cast<TypefaceSlant>(requested_style.slant());
+ pending_waitable_events_.insert(done_event);
font_service_->MatchFamilyName(
mojo::String(family_name), std::move(style),
base::Bind(&FontServiceThread::OnMatchFamilyNameComplete, this,
@@ -121,6 +122,7 @@ void FontServiceThread::OnMatchFamilyNameComplete(
mojo::String family_name,
TypefaceStylePtr style) {
DCHECK_EQ(GetThreadId(), base::PlatformThread::CurrentId());
+ pending_waitable_events_.erase(done_event);
*out_valid = font_identity;
if (font_identity) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698