Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: third_party/harfbuzz-ng/src/hb-open-file-private.hh

Issue 10510004: Roll harfbuzz-ng 3b8fd9c48f4bde368bf2d465c148b9743a9216ee (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
}
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-object-private.hh ('k') | third_party/harfbuzz-ng/src/hb-open-type-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698