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; |
} |