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

Side by Side Diff: Source/core/fetch/FontResource.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | « Source/core/events/TreeScopeEventContext.h ('k') | Source/core/fileapi/File.h » ('j') | 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 (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. 3 * Copyright (C) 2009 Torch Mobile, Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 SVGFontElement* FontResource::getSVGFontById(const String& fontName) const 171 SVGFontElement* FontResource::getSVGFontById(const String& fontName) const
172 { 172 {
173 RefPtrWillBeRawPtr<TagCollection> collection = m_externalSVGDocument->getEle mentsByTagNameNS(SVGNames::fontTag.namespaceURI(), SVGNames::fontTag.localName() ); 173 RefPtrWillBeRawPtr<TagCollection> collection = m_externalSVGDocument->getEle mentsByTagNameNS(SVGNames::fontTag.namespaceURI(), SVGNames::fontTag.localName() );
174 if (!collection) 174 if (!collection)
175 return 0; 175 return 0;
176 176
177 unsigned collectionLength = collection->length(); 177 unsigned collectionLength = collection->length();
178 if (!collectionLength) 178 if (!collectionLength)
179 return 0; 179 return 0;
180 180
181 #ifndef NDEBUG 181 #if ENABLE(ASSERT)
182 for (unsigned i = 0; i < collectionLength; ++i) { 182 for (unsigned i = 0; i < collectionLength; ++i) {
183 ASSERT(collection->item(i)); 183 ASSERT(collection->item(i));
184 ASSERT(isSVGFontElement(collection->item(i))); 184 ASSERT(isSVGFontElement(collection->item(i)));
185 } 185 }
186 #endif 186 #endif
187 187
188 if (fontName.isEmpty()) 188 if (fontName.isEmpty())
189 return toSVGFontElement(collection->item(0)); 189 return toSVGFontElement(collection->item(0));
190 190
191 for (unsigned i = 0; i < collectionLength; ++i) { 191 for (unsigned i = 0; i < collectionLength; ++i) {
(...skipping 29 matching lines...) Expand all
221 221
222 void FontResource::checkNotify() 222 void FontResource::checkNotify()
223 { 223 {
224 m_fontLoadWaitLimitTimer.stop(); 224 m_fontLoadWaitLimitTimer.stop();
225 ResourceClientWalker<FontResourceClient> w(m_clients); 225 ResourceClientWalker<FontResourceClient> w(m_clients);
226 while (FontResourceClient* c = w.next()) 226 while (FontResourceClient* c = w.next())
227 c->fontLoaded(this); 227 c->fontLoaded(this);
228 } 228 }
229 229
230 } 230 }
OLDNEW
« no previous file with comments | « Source/core/events/TreeScopeEventContext.h ('k') | Source/core/fileapi/File.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698