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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/FontCache.h

Issue 2807913002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/fonts Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2007-2008 Torch Mobile, Inc. 3 * Copyright (C) 2007-2008 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 * 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void dumpShapeResultCache(base::trace_event::ProcessMemoryDump*); 220 void dumpShapeResultCache(base::trace_event::ProcessMemoryDump*);
221 221
222 private: 222 private:
223 FontCache(); 223 FontCache();
224 ~FontCache(); 224 ~FontCache();
225 225
226 void purge(PurgeSeverity = PurgeIfNeeded); 226 void purge(PurgeSeverity = PurgeIfNeeded);
227 227
228 void disablePurging() { m_purgePreventCount++; } 228 void disablePurging() { m_purgePreventCount++; }
229 void enablePurging() { 229 void enablePurging() {
230 ASSERT(m_purgePreventCount); 230 DCHECK(m_purgePreventCount);
231 if (!--m_purgePreventCount) 231 if (!--m_purgePreventCount)
232 purge(PurgeIfNeeded); 232 purge(PurgeIfNeeded);
233 } 233 }
234 234
235 // FIXME: This method should eventually be removed. 235 // FIXME: This method should eventually be removed.
236 FontPlatformData* getFontPlatformData( 236 FontPlatformData* getFontPlatformData(
237 const FontDescription&, 237 const FontDescription&,
238 const FontFaceCreationParams&, 238 const FontFaceCreationParams&,
239 AlternateFontName = AlternateFontName::AllowAlternate); 239 AlternateFontName = AlternateFontName::AllowAlternate);
240 #if !OS(MACOSX) 240 #if !OS(MACOSX)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 public: 302 public:
303 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); } 303 FontCachePurgePreventer() { FontCache::fontCache()->disablePurging(); }
304 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); } 304 ~FontCachePurgePreventer() { FontCache::fontCache()->enablePurging(); }
305 }; 305 };
306 306
307 AtomicString toAtomicString(const SkString&); 307 AtomicString toAtomicString(const SkString&);
308 308
309 } // namespace blink 309 } // namespace blink
310 310
311 #endif 311 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698