提交 748198a6 编写于 作者: B Behdad Esfahbod

Revert "[aat.morx] Remove set_object() business"

This reverts commit ae8ed58a.

Apparently this broke Apple Chancery from OS X 10.12 :(.
Investigating...
上级 c8a2dc82
...@@ -1026,6 +1026,8 @@ struct Chain ...@@ -1026,6 +1026,8 @@ struct Chain
if (reverse) if (reverse)
c->buffer->reverse (); c->buffer->reverse ();
c->sanitizer.set_object (*subtable);
subtable->dispatch (c); subtable->dispatch (c);
if (reverse) if (reverse)
...@@ -1039,6 +1041,7 @@ struct Chain ...@@ -1039,6 +1041,7 @@ struct Chain
subtable = &StructAfter<ChainSubtable<Types> > (*subtable); subtable = &StructAfter<ChainSubtable<Types> > (*subtable);
c->set_lookup_index (c->lookup_index + 1); c->set_lookup_index (c->lookup_index + 1);
} }
c->sanitizer.reset_object ();
} }
inline unsigned int get_size (void) const { return length; } inline unsigned int get_size (void) const { return length; }
...@@ -1058,10 +1061,15 @@ struct Chain ...@@ -1058,10 +1061,15 @@ struct Chain
unsigned int count = subtableCount; unsigned int count = subtableCount;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
{ {
c->reset_object ();
if (unlikely (!c->check_struct (subtable)))
return_trace (false);
c->set_object (*subtable);
if (!subtable->sanitize (c)) if (!subtable->sanitize (c))
return_trace (false); return_trace (false);
subtable = &StructAfter<ChainSubtable<Types> > (*subtable); subtable = &StructAfter<ChainSubtable<Types> > (*subtable);
} }
c->reset_object ();
return_trace (true); return_trace (true);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册