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

Unified Diff: src/ports/SkFontHost_mac.cpp

Issue 419113002: Fix thread unsafe mutex initialization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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
Index: src/ports/SkFontHost_mac.cpp
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index a8e1b5793e604cca91f4fdbda1bf6dd8a27731ed..2d985f94638c07a980aeed23e4af552c7bcf00e3 100755
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -526,9 +526,9 @@ static SkTypeface* NewFromName(const char familyName[], SkTypeface::Style theSty
return ctFont ? NewFromFontRef(ctFont, familyName, false) : NULL;
}
+SK_DECLARE_STATIC_MUTEX(gGetDefaultFaceMutex);
static SkTypeface* GetDefaultFace() {
- SK_DECLARE_STATIC_MUTEX(gMutex);
- SkAutoMutexAcquire ma(gMutex);
+ SkAutoMutexAcquire ma(gGetDefaultFaceMutex);
static SkTypeface* gDefaultFace;

Powered by Google App Engine
This is Rietveld 408576698