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

Side by Side Diff: Source/platform/fonts/FontCache.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed config.gni. Minor cleanups. 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return fontDataFromFontPlatformData(platformData, shouldRetain); 144 return fontDataFromFontPlatformData(platformData, shouldRetain);
145 145
146 return nullptr; 146 return nullptr;
147 } 147 }
148 148
149 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(const FontPla tformData* platformData, ShouldRetain shouldRetain) 149 PassRefPtr<SimpleFontData> FontCache::fontDataFromFontPlatformData(const FontPla tformData* platformData, ShouldRetain shouldRetain)
150 { 150 {
151 if (!gFontDataCache) 151 if (!gFontDataCache)
152 gFontDataCache = new FontDataCache; 152 gFontDataCache = new FontDataCache;
153 153
154 #if ASSERT_ENABLED 154 #if ENABLE(ASSERT)
155 if (shouldRetain == DoNotRetain) 155 if (shouldRetain == DoNotRetain)
156 ASSERT(m_purgePreventCount); 156 ASSERT(m_purgePreventCount);
157 #endif 157 #endif
158 158
159 return gFontDataCache->get(platformData, shouldRetain); 159 return gFontDataCache->get(platformData, shouldRetain);
160 } 160 }
161 161
162 bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription, const AtomicString& family) 162 bool FontCache::isPlatformFontAvailable(const FontDescription& fontDescription, const AtomicString& family)
163 { 163 {
164 bool checkingAlternateName = true; 164 bool checkingAlternateName = true;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 clients.append(*it); 283 clients.append(*it);
284 284
285 ASSERT(numClients == clients.size()); 285 ASSERT(numClients == clients.size());
286 for (size_t i = 0; i < numClients; ++i) 286 for (size_t i = 0; i < numClients; ++i)
287 clients[i]->fontCacheInvalidated(); 287 clients[i]->fontCacheInvalidated();
288 288
289 purge(ForcePurge); 289 purge(ForcePurge);
290 } 290 }
291 291
292 } // namespace WebCore 292 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698