Make TSan happy with make_immutable()
diff --git a/src/hb-blob.cc b/src/hb-blob.cc index fca3c91..f095266 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc
@@ -293,6 +293,8 @@ { if (hb_object_is_inert (blob)) return; + if (blob->immutable) + return; blob->immutable = true; }
diff --git a/src/hb-face.cc b/src/hb-face.cc index 19eea4d..fbab18a 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc
@@ -325,6 +325,8 @@ { if (unlikely (hb_object_is_inert (face))) return; + if (face->immutable) + return; face->immutable = true; }
diff --git a/src/hb-font.cc b/src/hb-font.cc index 9dcf6c1..77762f2 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc
@@ -586,6 +586,8 @@ { if (unlikely (hb_object_is_inert (ffuncs))) return; + if (ffuncs->immutable) + return; ffuncs->immutable = true; } @@ -1444,6 +1446,8 @@ { if (unlikely (hb_object_is_inert (font))) return; + if (font->immutable) + return; if (font->parent) hb_font_make_immutable (font->parent);
diff --git a/src/hb-unicode.cc b/src/hb-unicode.cc index bb1cd68..0e8b520 100644 --- a/src/hb-unicode.cc +++ b/src/hb-unicode.cc
@@ -308,6 +308,8 @@ { if (unlikely (hb_object_is_inert (ufuncs))) return; + if (ufuncs->immutable) + return; ufuncs->immutable = true; }