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

Unified Diff: src/pdf/SkPDFFont.cpp

Issue 348113002: Use SkMutex::assertHeld in SkPDFFont and SkPDFShader. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | src/pdf/SkPDFShader.cpp » ('j') | src/pdf/SkPDFShader.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFont.cpp
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index 49d383b204ea1f0c25c089fc6ca17efb58ca9db9..c4f013dd37291015c13fefd01472bc0ff1dfb7df 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -872,7 +872,8 @@ SkPDFFont* SkPDFFont::getFontSubset(const SkPDFGlyphSet*) {
// static
SkTDArray<SkPDFFont::FontRec>& SkPDFFont::CanonicalFonts() {
- // This initialization is only thread safe with gcc.
+ SkPDFFont::CanonicalFontsMutex().assertHeld();
+ // This initialization is only thread safe with gcc, so hold the mutex.
mtklein 2014/06/20 17:40:54 It's not even safe in Chromium. They disable the
hal.canary 2014/06/20 17:49:06 Done.
static SkTDArray<FontRec> gCanonicalFonts;
return gCanonicalFonts;
}
« no previous file with comments | « no previous file | src/pdf/SkPDFShader.cpp » ('j') | src/pdf/SkPDFShader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698