Bug 1356103 - Part 6: Make gfxUserFontSet refcounting thread-safe. r=bholley draft
authorCameron McCormack <cam@mcc.id.au>
Sun, 30 Apr 2017 14:48:17 +0800
changeset 572578 b7f5298203aa0281b656198c209d7b18cfee62ac
parent 572577 281e0b2118e6e79a6756636fff7373f316894c44
child 572579 ce4d984030ee4cf01f2c8b2dff25d349c6eb8444
push id57115
push userbmo:cam@mcc.id.au
push dateThu, 04 May 2017 10:01:25 +0000
reviewersbholley
bugs1356103
milestone55.0a1
Bug 1356103 - Part 6: Make gfxUserFontSet refcounting thread-safe. r=bholley As with a few other gfx* font-related classes, during font metrics calculations we end up taking strong references to gfxUserFontSet, and it would be difficult to restructure the code to not do this. MozReview-Commit-ID: L1GbZnf4825
gfx/thebes/gfxUserFontSet.h
--- a/gfx/thebes/gfxUserFontSet.h
+++ b/gfx/thebes/gfxUserFontSet.h
@@ -170,17 +170,17 @@ class gfxUserFontEntry;
 class gfxOTSContext;
 
 class gfxUserFontSet {
     friend class gfxUserFontEntry;
     friend class gfxOTSContext;
 
 public:
 
-    NS_INLINE_DECL_REFCOUNTING(gfxUserFontSet)
+    NS_INLINE_DECL_THREADSAFE_REFCOUNTING(gfxUserFontSet)
 
     gfxUserFontSet();
 
     enum {
         // no flags ==> no hint set
         // unknown ==> unknown format hint set
         FLAG_FORMAT_UNKNOWN        = 1,
         FLAG_FORMAT_OPENTYPE       = 1 << 1,