Make TSan happy with make_immutable()

This commit is contained in:
Behdad Esfahbod 2018-09-26 15:03:07 -04:00
parent 34d5a25953
commit 90a0f9fa0c
4 changed files with 10 additions and 0 deletions

View File

@ -293,6 +293,8 @@ hb_blob_make_immutable (hb_blob_t *blob)
{
if (hb_object_is_inert (blob))
return;
if (blob->immutable)
return;
blob->immutable = true;
}

View File

@ -325,6 +325,8 @@ hb_face_make_immutable (hb_face_t *face)
{
if (unlikely (hb_object_is_inert (face)))
return;
if (face->immutable)
return;
face->immutable = true;
}

View File

@ -586,6 +586,8 @@ hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs)
{
if (unlikely (hb_object_is_inert (ffuncs)))
return;
if (ffuncs->immutable)
return;
ffuncs->immutable = true;
}
@ -1444,6 +1446,8 @@ hb_font_make_immutable (hb_font_t *font)
{
if (unlikely (hb_object_is_inert (font)))
return;
if (font->immutable)
return;
if (font->parent)
hb_font_make_immutable (font->parent);

View File

@ -308,6 +308,8 @@ hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs)
{
if (unlikely (hb_object_is_inert (ufuncs)))
return;
if (ufuncs->immutable)
return;
ufuncs->immutable = true;
}