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

Side by Side Diff: third_party/sfntly/src/subsetter/subsetter_impl.cc

Issue 7670020: Roll sfntly to 54 to address root cause of 92270. Fix leak in our usage of sfntly. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. All Rights Reserved. 2 * Copyright 2011 Google Inc. All Rights Reserved.
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at 6 * You may obtain a copy of the License at
7 * 7 *
8 * http://www.apache.org/licenses/LICENSE-2.0 8 * http://www.apache.org/licenses/LICENSE-2.0
9 * 9 *
10 * Unless required by applicable law or agreed to in writing, software 10 * Unless required by applicable law or agreed to in writing, software
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 case NameId::kPreferredFamily: 166 case NameId::kPreferredFamily:
167 case NameId::kPreferredSubfamily: 167 case NameId::kPreferredSubfamily:
168 case NameId::kWWSFamilyName: 168 case NameId::kWWSFamilyName:
169 case NameId::kWWSSubfamilyName: { 169 case NameId::kWWSSubfamilyName: {
170 int32_t hash_code = HashCode(name_table->PlatformId(i), 170 int32_t hash_code = HashCode(name_table->PlatformId(i),
171 name_table->EncodingId(i), 171 name_table->EncodingId(i),
172 name_table->LanguageId(i), 172 name_table->LanguageId(i),
173 name_table->NameId(i)); 173 name_table->NameId(i));
174 UChar* name_part = name_table->Name(i); 174 UChar* name_part = name_table->Name(i);
175 ConstructName(name_part, &(names[hash_code]), name_table->NameId(i)); 175 ConstructName(name_part, &(names[hash_code]), name_table->NameId(i));
176 delete[] name_part;
176 break; 177 break;
177 } 178 }
178 default: 179 default:
179 break; 180 break;
180 } 181 }
181 } 182 }
182 183
183 if (!names.empty()) { 184 if (!names.empty()) {
184 for (NameMap::iterator b = names.begin(), e = names.end(); b != e; ++b) { 185 for (NameMap::iterator b = names.begin(), e = names.end(); b != e; ++b) {
185 if (b->second.caseCompare(font_string, 0) == 0 || 186 if (b->second.caseCompare(font_string, 0) == 0 ||
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 TableBuilderPtr dereference; 332 TableBuilderPtr dereference;
332 dereference.Attach( 333 dereference.Attach(
333 font_builder->NewTableBuilder(i->first, i->second->ReadFontData())); 334 font_builder->NewTableBuilder(i->first, i->second->ReadFontData()));
334 } 335 }
335 } 336 }
336 337
337 return font_builder->Build(); 338 return font_builder->Build();
338 } 339 }
339 340
340 } // namespace sfntly 341 } // namespace sfntly
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698