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

Unified Diff: Source/platform/fonts/opentype/OpenTypeSanitizer.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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
« no previous file with comments | « Source/platform/fonts/mac/SimpleFontDataMac.mm ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/opentype/OpenTypeSanitizer.cpp
diff --git a/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp b/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp
index 4829bd0fd0f59dde0c25274100568cf2a063a48a..0b1d007efcf01fad3237d6dc2a57d771b31af374 100644
--- a/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp
+++ b/Source/platform/fonts/opentype/OpenTypeSanitizer.cpp
@@ -41,12 +41,12 @@ namespace WebCore {
PassRefPtr<SharedBuffer> OpenTypeSanitizer::sanitize()
{
if (!m_buffer)
- return 0;
+ return nullptr;
// This is the largest web font size which we'll try to transcode.
static const size_t maxWebFontSize = 30 * 1024 * 1024; // 30 MB
if (m_buffer->size() > maxWebFontSize)
- return 0;
+ return nullptr;
if (RuntimeEnabledFeatures::woff2Enabled())
ots::EnableWOFF2();
@@ -60,7 +60,7 @@ PassRefPtr<SharedBuffer> OpenTypeSanitizer::sanitize()
ots::ExpandingMemoryStream output(m_buffer->size(), maxWebFontSize);
if (!ots::Process(&output, reinterpret_cast<const uint8_t*>(m_buffer->data()), m_buffer->size()))
- return 0;
+ return nullptr;
const size_t transcodeLen = output.Tell();
return SharedBuffer::create(static_cast<unsigned char*>(output.get()), transcodeLen);
« no previous file with comments | « Source/platform/fonts/mac/SimpleFontDataMac.mm ('k') | Source/platform/fonts/skia/FontCacheSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698