Index: third_party/harfbuzz-ng/src/hb-open-file-private.hh |
diff --git a/third_party/harfbuzz-ng/src/hb-open-file-private.hh b/third_party/harfbuzz-ng/src/hb-open-file-private.hh |
index 62e1f1700afb0e1cc0911068df19fde67c85de05..ce18580f0ec4366b5987a440f1eaf5396d2ec798 100644 |
--- a/third_party/harfbuzz-ng/src/hb-open-file-private.hh |
+++ b/third_party/harfbuzz-ng/src/hb-open-file-private.hh |
@@ -1,5 +1,6 @@ |
/* |
* Copyright © 2007,2008,2009 Red Hat, Inc. |
+ * Copyright © 2012 Google, Inc. |
* |
* This is part of HarfBuzz, a text shaping library. |
* |
@@ -22,6 +23,7 @@ |
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
* |
* Red Hat Author(s): Behdad Esfahbod |
+ * Google Author(s): Behdad Esfahbod |
*/ |
#ifndef HB_OPEN_FILE_PRIVATE_HH |
@@ -51,7 +53,7 @@ typedef struct TableRecord |
{ |
inline bool sanitize (hb_sanitize_context_t *c) { |
TRACE_SANITIZE (); |
- return c->check_struct (this); |
+ return TRACE_RETURN (c->check_struct (this)); |
} |
Tag tag; /* 4-byte identifier. */ |
@@ -100,8 +102,7 @@ typedef struct OffsetTable |
public: |
inline bool sanitize (hb_sanitize_context_t *c) { |
TRACE_SANITIZE (); |
- return c->check_struct (this) |
- && c->check_array (tables, TableRecord::static_size, numTables); |
+ return TRACE_RETURN (c->check_struct (this) && c->check_array (tables, TableRecord::static_size, numTables)); |
} |
private: |
@@ -129,7 +130,7 @@ struct TTCHeaderVersion1 |
inline bool sanitize (hb_sanitize_context_t *c) { |
TRACE_SANITIZE (); |
- return table.sanitize (c, this); |
+ return TRACE_RETURN (table.sanitize (c, this)); |
} |
private: |
@@ -168,11 +169,11 @@ struct TTCHeader |
inline bool sanitize (hb_sanitize_context_t *c) { |
TRACE_SANITIZE (); |
- if (unlikely (!u.header.version.sanitize (c))) return false; |
+ if (unlikely (!u.header.version.sanitize (c))) return TRACE_RETURN (false); |
switch (u.header.version.major) { |
case 2: /* version 2 is compatible with version 1 */ |
- case 1: return u.version1.sanitize (c); |
- default:return true; |
+ case 1: return TRACE_RETURN (u.version1.sanitize (c)); |
+ default:return TRACE_RETURN (true); |
} |
} |
@@ -230,14 +231,14 @@ struct OpenTypeFontFile |
inline bool sanitize (hb_sanitize_context_t *c) { |
TRACE_SANITIZE (); |
- if (unlikely (!u.tag.sanitize (c))) return false; |
+ if (unlikely (!u.tag.sanitize (c))) return TRACE_RETURN (false); |
switch (u.tag) { |
case CFFTag: /* All the non-collection tags */ |
case TrueTag: |
case Typ1Tag: |
- case TrueTypeTag: return u.fontFace.sanitize (c); |
- case TTCTag: return u.ttcHeader.sanitize (c); |
- default: return true; |
+ case TrueTypeTag: return TRACE_RETURN (u.fontFace.sanitize (c)); |
+ case TTCTag: return TRACE_RETURN (u.ttcHeader.sanitize (c)); |
+ default: return TRACE_RETURN (true); |
} |
} |