Title: [261393] trunk/Source/WTF
Revision
261393
Author
don.olmst...@sony.com
Date
2020-05-08 10:31:54 -0700 (Fri, 08 May 2020)

Log Message

[clang-tidy] Run modernize-use-nullptr over WTF
https://bugs.webkit.org/show_bug.cgi?id=211628

Reviewed by Yusuke Suzuki.

Use the fix option in clang-tidy to ensure nullptr is being used across WTF.

* wtf/Assertions.cpp:
* wtf/BumpPointerAllocator.h:
(WTF::BumpPointerPool::BumpPointerPool):
(WTF::BumpPointerPool::create):
(WTF::BumpPointerAllocator::BumpPointerAllocator):
* wtf/DataLog.cpp:
(WTF::setDataFile):
* wtf/DateMath.cpp:
(WTF::parseES5DatePortion):
(WTF::parseES5TimePortion):
* wtf/FastMalloc.cpp:
(WTF::fastZeroedMalloc):
(WTF::fastStrDup):
(WTF::tryFastZeroedMalloc):
(WTF::isFastMallocEnabled):
(WTF::fastMallocGoodSize):
(WTF::fastAlignedMalloc):
(WTF::tryFastAlignedMalloc):
(WTF::fastAlignedFree):
(WTF::tryFastMalloc):
(WTF::fastMalloc):
(WTF::tryFastCalloc):
(WTF::fastCalloc):
(WTF::fastFree):
(WTF::fastRealloc):
(WTF::tryFastRealloc):
(WTF::releaseFastMallocFreeMemory):
(WTF::releaseFastMallocFreeMemoryForThisThread):
(WTF::fastMallocStatistics):
(WTF::fastMallocSize):
(WTF::fastCommitAlignedMemory):
(WTF::fastDecommitAlignedMemory):
(WTF::fastEnableMiniMode):
(WTF::fastDisableScavenger):
(WTF::fastMallocDumpMallocStats):
(WTF::AvoidRecordingScope::avoidRecordingCount):
(WTF::AvoidRecordingScope::AvoidRecordingScope):
(WTF::AvoidRecordingScope::~AvoidRecordingScope):
(WTF::MallocCallTracker::MallocSiteData::MallocSiteData):
(WTF::MallocCallTracker::singleton):
(WTF::MallocCallTracker::MallocCallTracker):
(WTF::MallocCallTracker::recordMalloc):
(WTF::MallocCallTracker::recordRealloc):
(WTF::MallocCallTracker::recordFree):
(WTF::MallocCallTracker::dumpStats):
* wtf/HashTable.h:
(WTF::KeyTraits>::inlineLookup):
(WTF::KeyTraits>::lookupForWriting):
(WTF::KeyTraits>::fullLookupForWriting):
(WTF::KeyTraits>::add):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::findAndRemoveFreeSpace):
* wtf/ParallelJobsGeneric.cpp:
* wtf/RandomDevice.cpp:
(WTF::RandomDevice::cryptographicallyRandomValues):
* wtf/RawPointer.h:
(WTF::RawPointer::RawPointer):
* wtf/RedBlackTree.h:
* wtf/SHA1.cpp:
(WTF::SHA1::hexDigest):
* wtf/SchedulePair.h:
(WTF::SchedulePair::SchedulePair):
* wtf/StackTrace.cpp:
(WTFGetBacktrace):
(WTF::StackTrace::dump const):
* wtf/StringExtras.h:
(strnstr):
* wtf/Variant.h:
* wtf/Vector.h:
(WTF::VectorBufferBase::deallocateBuffer):
(WTF::VectorBufferBase::releaseBuffer):
(WTF::VectorBufferBase::VectorBufferBase):
* wtf/cf/CFURLExtras.cpp:
(WTF::createCFURLFromBuffer):
(WTF::getURLBytes):
* wtf/cf/CFURLExtras.h:
* wtf/cf/FileSystemCF.cpp:
(WTF::FileSystem::pathAsURL):
* wtf/dtoa/double-conversion.cc:
* wtf/dtoa/utils.h:
(WTF::double_conversion::BufferReference::BufferReference):
* wtf/text/CString.cpp:
(WTF::CString::mutableData):
* wtf/text/CString.h:
* wtf/text/StringBuffer.h:
(WTF::StringBuffer::release):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitializedInternal):
(WTF::StringImpl::reallocateInternal):
* wtf/text/StringImpl.h:
(WTF::StringImpl::constructInternal<LChar>):
(WTF::StringImpl::constructInternal<UChar>):
(WTF::StringImpl::characters<LChar> const):
(WTF::StringImpl::characters<UChar> const):
(WTF::find):
(WTF::reverseFindLineTerminator):
(WTF::reverseFind):
(WTF::equalIgnoringNullity):
(WTF::codePointCompare):
(WTF::isSpaceOrNewline):
(WTF::lengthOfNullTerminatedString):
(WTF::StringImplShape::StringImplShape):
(WTF::StringImpl::isolatedCopy const):
(WTF::StringImpl::isAllASCII const):
(WTF::StringImpl::isAllLatin1 const):
(WTF::isAllSpecialCharacters):
(WTF::isSpecialCharacter const):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::create8BitIfPossible):
(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::adopt):
(WTF::StringImpl::cost const):
(WTF::StringImpl::costDuringGC):
(WTF::StringImpl::setIsAtom):
(WTF::StringImpl::setHash const):
(WTF::StringImpl::ref):
(WTF::StringImpl::deref):
(WTF::StringImpl::copyCharacters):
(WTF::StringImpl::at const):
(WTF::StringImpl::allocationSize):
(WTF::StringImpl::maxInternalLength):
(WTF::StringImpl::tailOffset):
(WTF::StringImpl::requiresCopy const):
(WTF::StringImpl::tailPointer const):
(WTF::StringImpl::tailPointer):
(WTF::StringImpl::substringBuffer const):
(WTF::StringImpl::substringBuffer):
(WTF::StringImpl::assertHashIsCorrect const):
(WTF::StringImpl::StaticStringImpl::StaticStringImpl):
(WTF::StringImpl::StaticStringImpl::operator StringImpl&):
(WTF::equalIgnoringASCIICase):
(WTF::startsWithLettersIgnoringASCIICase):
(WTF::equalLettersIgnoringASCIICase):
* wtf/text/TextBreakIterator.cpp:
(WTF::initializeIterator):
(WTF::setContextAwareTextForIterator):
(WTF::openLineBreakIterator):
* wtf/text/TextBreakIterator.h:
(WTF::LazyLineBreakIterator::get):
* wtf/text/WTFString.cpp:
(WTF::charactersToFloat):
* wtf/text/cf/StringImplCF.cpp:
(WTF::StringWrapperCFAllocator::allocate):
(WTF::StringWrapperCFAllocator::create):
(WTF::StringImpl::createCFString):
* wtf/text/icu/UTextProviderLatin1.cpp:
(WTF::uTextLatin1Clone):
(WTF::openLatin1ContextAwareUTextProvider):
* wtf/text/icu/UTextProviderUTF16.cpp:
(WTF::openUTF16ContextAwareUTextProvider):
* wtf/win/FileSystemWin.cpp:
(WTF::FileSystemImpl::makeAllDirectories):
(WTF::FileSystemImpl::storageDirectory):
(WTF::FileSystemImpl::openTemporaryFile):
(WTF::FileSystemImpl::openFile):
(WTF::FileSystemImpl::writeToFile):
(WTF::FileSystemImpl::readFromFile):
(WTF::FileSystemImpl::deleteNonEmptyDirectory):
* wtf/win/LanguageWin.cpp:
(WTF::localeInfo):
* wtf/win/MainThreadWin.cpp:
(WTF::initializeMainThreadPlatform):
* wtf/win/OSAllocatorWin.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
* wtf/win/RunLoopWin.cpp:
(WTF::RunLoop::run):
(WTF::RunLoop::iterate):
(WTF::RunLoop::RunLoop):
(WTF::RunLoop::cycle):
(WTF::RunLoop::TimerBase::start):
* wtf/win/ThreadingWin.cpp:
(WTF::Thread::establishHandle):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (261392 => 261393)


--- trunk/Source/WTF/ChangeLog	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/ChangeLog	2020-05-08 17:31:54 UTC (rev 261393)
@@ -1,3 +1,188 @@
+2020-05-08  Don Olmstead  <don.olmst...@sony.com>
+
+        [clang-tidy] Run modernize-use-nullptr over WTF
+        https://bugs.webkit.org/show_bug.cgi?id=211628
+
+        Reviewed by Yusuke Suzuki.
+
+        Use the fix option in clang-tidy to ensure nullptr is being used across WTF.
+
+        * wtf/Assertions.cpp:
+        * wtf/BumpPointerAllocator.h:
+        (WTF::BumpPointerPool::BumpPointerPool):
+        (WTF::BumpPointerPool::create):
+        (WTF::BumpPointerAllocator::BumpPointerAllocator):
+        * wtf/DataLog.cpp:
+        (WTF::setDataFile):
+        * wtf/DateMath.cpp:
+        (WTF::parseES5DatePortion):
+        (WTF::parseES5TimePortion):
+        * wtf/FastMalloc.cpp:
+        (WTF::fastZeroedMalloc):
+        (WTF::fastStrDup):
+        (WTF::tryFastZeroedMalloc):
+        (WTF::isFastMallocEnabled):
+        (WTF::fastMallocGoodSize):
+        (WTF::fastAlignedMalloc):
+        (WTF::tryFastAlignedMalloc):
+        (WTF::fastAlignedFree):
+        (WTF::tryFastMalloc):
+        (WTF::fastMalloc):
+        (WTF::tryFastCalloc):
+        (WTF::fastCalloc):
+        (WTF::fastFree):
+        (WTF::fastRealloc):
+        (WTF::tryFastRealloc):
+        (WTF::releaseFastMallocFreeMemory):
+        (WTF::releaseFastMallocFreeMemoryForThisThread):
+        (WTF::fastMallocStatistics):
+        (WTF::fastMallocSize):
+        (WTF::fastCommitAlignedMemory):
+        (WTF::fastDecommitAlignedMemory):
+        (WTF::fastEnableMiniMode):
+        (WTF::fastDisableScavenger):
+        (WTF::fastMallocDumpMallocStats):
+        (WTF::AvoidRecordingScope::avoidRecordingCount):
+        (WTF::AvoidRecordingScope::AvoidRecordingScope):
+        (WTF::AvoidRecordingScope::~AvoidRecordingScope):
+        (WTF::MallocCallTracker::MallocSiteData::MallocSiteData):
+        (WTF::MallocCallTracker::singleton):
+        (WTF::MallocCallTracker::MallocCallTracker):
+        (WTF::MallocCallTracker::recordMalloc):
+        (WTF::MallocCallTracker::recordRealloc):
+        (WTF::MallocCallTracker::recordFree):
+        (WTF::MallocCallTracker::dumpStats):
+        * wtf/HashTable.h:
+        (WTF::KeyTraits>::inlineLookup):
+        (WTF::KeyTraits>::lookupForWriting):
+        (WTF::KeyTraits>::fullLookupForWriting):
+        (WTF::KeyTraits>::add):
+        * wtf/MetaAllocator.cpp:
+        (WTF::MetaAllocator::findAndRemoveFreeSpace):
+        * wtf/ParallelJobsGeneric.cpp:
+        * wtf/RandomDevice.cpp:
+        (WTF::RandomDevice::cryptographicallyRandomValues):
+        * wtf/RawPointer.h:
+        (WTF::RawPointer::RawPointer):
+        * wtf/RedBlackTree.h:
+        * wtf/SHA1.cpp:
+        (WTF::SHA1::hexDigest):
+        * wtf/SchedulePair.h:
+        (WTF::SchedulePair::SchedulePair):
+        * wtf/StackTrace.cpp:
+        (WTFGetBacktrace):
+        (WTF::StackTrace::dump const):
+        * wtf/StringExtras.h:
+        (strnstr):
+        * wtf/Variant.h:
+        * wtf/Vector.h:
+        (WTF::VectorBufferBase::deallocateBuffer):
+        (WTF::VectorBufferBase::releaseBuffer):
+        (WTF::VectorBufferBase::VectorBufferBase):
+        * wtf/cf/CFURLExtras.cpp:
+        (WTF::createCFURLFromBuffer):
+        (WTF::getURLBytes):
+        * wtf/cf/CFURLExtras.h:
+        * wtf/cf/FileSystemCF.cpp:
+        (WTF::FileSystem::pathAsURL):
+        * wtf/dtoa/double-conversion.cc:
+        * wtf/dtoa/utils.h:
+        (WTF::double_conversion::BufferReference::BufferReference):
+        * wtf/text/CString.cpp:
+        (WTF::CString::mutableData):
+        * wtf/text/CString.h:
+        * wtf/text/StringBuffer.h:
+        (WTF::StringBuffer::release):
+        * wtf/text/StringImpl.cpp:
+        (WTF::StringImpl::createUninitializedInternal):
+        (WTF::StringImpl::reallocateInternal):
+        * wtf/text/StringImpl.h:
+        (WTF::StringImpl::constructInternal<LChar>):
+        (WTF::StringImpl::constructInternal<UChar>):
+        (WTF::StringImpl::characters<LChar> const):
+        (WTF::StringImpl::characters<UChar> const):
+        (WTF::find):
+        (WTF::reverseFindLineTerminator):
+        (WTF::reverseFind):
+        (WTF::equalIgnoringNullity):
+        (WTF::codePointCompare):
+        (WTF::isSpaceOrNewline):
+        (WTF::lengthOfNullTerminatedString):
+        (WTF::StringImplShape::StringImplShape):
+        (WTF::StringImpl::isolatedCopy const):
+        (WTF::StringImpl::isAllASCII const):
+        (WTF::StringImpl::isAllLatin1 const):
+        (WTF::isAllSpecialCharacters):
+        (WTF::isSpecialCharacter const):
+        (WTF::StringImpl::StringImpl):
+        (WTF::StringImpl::create8BitIfPossible):
+        (WTF::StringImpl::createSubstringSharingImpl):
+        (WTF::StringImpl::createFromLiteral):
+        (WTF::StringImpl::tryCreateUninitialized):
+        (WTF::StringImpl::adopt):
+        (WTF::StringImpl::cost const):
+        (WTF::StringImpl::costDuringGC):
+        (WTF::StringImpl::setIsAtom):
+        (WTF::StringImpl::setHash const):
+        (WTF::StringImpl::ref):
+        (WTF::StringImpl::deref):
+        (WTF::StringImpl::copyCharacters):
+        (WTF::StringImpl::at const):
+        (WTF::StringImpl::allocationSize):
+        (WTF::StringImpl::maxInternalLength):
+        (WTF::StringImpl::tailOffset):
+        (WTF::StringImpl::requiresCopy const):
+        (WTF::StringImpl::tailPointer const):
+        (WTF::StringImpl::tailPointer):
+        (WTF::StringImpl::substringBuffer const):
+        (WTF::StringImpl::substringBuffer):
+        (WTF::StringImpl::assertHashIsCorrect const):
+        (WTF::StringImpl::StaticStringImpl::StaticStringImpl):
+        (WTF::StringImpl::StaticStringImpl::operator StringImpl&):
+        (WTF::equalIgnoringASCIICase):
+        (WTF::startsWithLettersIgnoringASCIICase):
+        (WTF::equalLettersIgnoringASCIICase):
+        * wtf/text/TextBreakIterator.cpp:
+        (WTF::initializeIterator):
+        (WTF::setContextAwareTextForIterator):
+        (WTF::openLineBreakIterator):
+        * wtf/text/TextBreakIterator.h:
+        (WTF::LazyLineBreakIterator::get):
+        * wtf/text/WTFString.cpp:
+        (WTF::charactersToFloat):
+        * wtf/text/cf/StringImplCF.cpp:
+        (WTF::StringWrapperCFAllocator::allocate):
+        (WTF::StringWrapperCFAllocator::create):
+        (WTF::StringImpl::createCFString):
+        * wtf/text/icu/UTextProviderLatin1.cpp:
+        (WTF::uTextLatin1Clone):
+        (WTF::openLatin1ContextAwareUTextProvider):
+        * wtf/text/icu/UTextProviderUTF16.cpp:
+        (WTF::openUTF16ContextAwareUTextProvider):
+        * wtf/win/FileSystemWin.cpp:
+        (WTF::FileSystemImpl::makeAllDirectories):
+        (WTF::FileSystemImpl::storageDirectory):
+        (WTF::FileSystemImpl::openTemporaryFile):
+        (WTF::FileSystemImpl::openFile):
+        (WTF::FileSystemImpl::writeToFile):
+        (WTF::FileSystemImpl::readFromFile):
+        (WTF::FileSystemImpl::deleteNonEmptyDirectory):
+        * wtf/win/LanguageWin.cpp:
+        (WTF::localeInfo):
+        * wtf/win/MainThreadWin.cpp:
+        (WTF::initializeMainThreadPlatform):
+        * wtf/win/OSAllocatorWin.cpp:
+        (WTF::OSAllocator::reserveUncommitted):
+        (WTF::OSAllocator::reserveAndCommit):
+        * wtf/win/RunLoopWin.cpp:
+        (WTF::RunLoop::run):
+        (WTF::RunLoop::iterate):
+        (WTF::RunLoop::RunLoop):
+        (WTF::RunLoop::cycle):
+        (WTF::RunLoop::TimerBase::start):
+        * wtf/win/ThreadingWin.cpp:
+        (WTF::Thread::establishHandle):
+
 2020-05-08  Darin Adler  <da...@apple.com>
 
         Make callBufferProducingFunction safer to use by adding a compile-time assertion

Modified: trunk/Source/WTF/wtf/Assertions.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/Assertions.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/Assertions.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -311,7 +311,7 @@
 #if COMPILER(GCC_COMPATIBLE)
     __builtin_trap();
 #else
-    ((void(*)())0)();
+    ((void(*)())nullptr)();
 #endif // COMPILER(GCC_COMPATIBLE)
 #endif // ASAN_ENABLED
 }
@@ -516,7 +516,7 @@
             return channel;
     }
 
-    return 0;
+    return nullptr;
 }
 
 static void setStateOfAllChannels(WTFLogChannel* channels[], size_t channelCount, WTFLogChannelState state)

Modified: trunk/Source/WTF/wtf/BumpPointerAllocator.h (261392 => 261393)


--- trunk/Source/WTF/wtf/BumpPointerAllocator.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/BumpPointerAllocator.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -99,8 +99,8 @@
     BumpPointerPool(const PageAllocation& allocation)
         : m_current(allocation.base())
         , m_start(allocation.base())
-        , m_next(0)
-        , m_previous(0)
+        , m_next(nullptr)
+        , m_previous(nullptr)
         , m_allocation(allocation)
     {
     }
@@ -110,7 +110,7 @@
         // Add size of BumpPointerPool object, check for overflow.
         minimumCapacity += sizeof(BumpPointerPool);
         if (minimumCapacity < sizeof(BumpPointerPool))
-            return 0;
+            return nullptr;
 
         size_t poolSize = std::max(static_cast<size_t>(MINIMUM_BUMP_POOL_SIZE), WTF::pageSize());
         while (poolSize < minimumCapacity) {
@@ -118,13 +118,13 @@
             // The following if check relies on MINIMUM_BUMP_POOL_SIZE being a power of 2!
             ASSERT(!(MINIMUM_BUMP_POOL_SIZE & (MINIMUM_BUMP_POOL_SIZE - 1)));
             if (!poolSize)
-                return 0;
+                return nullptr;
         }
 
         PageAllocation allocation = PageAllocation::allocate(poolSize);
         if (!!allocation)
             return new (allocation) BumpPointerPool(allocation);
-        return 0;
+        return nullptr;
     }
 
     void shrink()
@@ -222,7 +222,7 @@
     WTF_MAKE_FAST_ALLOCATED;
 public:
     BumpPointerAllocator()
-        : m_head(0)
+        : m_head(nullptr)
     {
     }
 

Modified: trunk/Source/WTF/wtf/DataLog.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/DataLog.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/DataLog.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -156,7 +156,7 @@
         file = new (s_fileData) FilePrintStream(stderr, FilePrintStream::Borrow);
     }
 
-    setvbuf(file->file(), 0, _IONBF, 0); // Prefer unbuffered output, so that we get a full log upon crash or deadlock.
+    setvbuf(file->file(), nullptr, _IONBF, 0); // Prefer unbuffered output, so that we get a full log upon crash or deadlock.
 
     if (s_file)
         s_file->flush();

Modified: trunk/Source/WTF/wtf/DateMath.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/DateMath.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/DateMath.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -490,7 +490,7 @@
     // instead of restricting to 4 digits (or 6 digits with mandatory +/-),
     // it accepts any integer value. Consider this an implementation fallback.
     if (!parseInt(currentPosition, &postParsePosition, 10, &year))
-        return 0;
+        return nullptr;
 
     // Check for presence of -MM portion.
     if (*postParsePosition != '-')
@@ -498,11 +498,11 @@
     currentPosition = postParsePosition + 1;
     
     if (!isASCIIDigit(*currentPosition))
-        return 0;
+        return nullptr;
     if (!parseLong(currentPosition, &postParsePosition, 10, &month))
-        return 0;
+        return nullptr;
     if ((postParsePosition - currentPosition) != 2)
-        return 0;
+        return nullptr;
 
     // Check for presence of -DD portion.
     if (*postParsePosition != '-')
@@ -510,11 +510,11 @@
     currentPosition = postParsePosition + 1;
     
     if (!isASCIIDigit(*currentPosition))
-        return 0;
+        return nullptr;
     if (!parseLong(currentPosition, &postParsePosition, 10, &day))
-        return 0;
+        return nullptr;
     if ((postParsePosition - currentPosition) != 2)
-        return 0;
+        return nullptr;
     return postParsePosition;
 }
 
@@ -527,19 +527,19 @@
 
     char* postParsePosition;
     if (!isASCIIDigit(*currentPosition))
-        return 0;
+        return nullptr;
     if (!parseLong(currentPosition, &postParsePosition, 10, &hours))
-        return 0;
+        return nullptr;
     if (*postParsePosition != ':' || (postParsePosition - currentPosition) != 2)
-        return 0;
+        return nullptr;
     currentPosition = postParsePosition + 1;
     
     if (!isASCIIDigit(*currentPosition))
-        return 0;
+        return nullptr;
     if (!parseLong(currentPosition, &postParsePosition, 10, &minutes))
-        return 0;
+        return nullptr;
     if ((postParsePosition - currentPosition) != 2)
-        return 0;
+        return nullptr;
     currentPosition = postParsePosition;
 
     // Seconds are optional.
@@ -548,11 +548,11 @@
     
         long intSeconds;
         if (!isASCIIDigit(*currentPosition))
-            return 0;
+            return nullptr;
         if (!parseLong(currentPosition, &postParsePosition, 10, &intSeconds))
-            return 0;
+            return nullptr;
         if ((postParsePosition - currentPosition) != 2)
-            return 0;
+            return nullptr;
         seconds = intSeconds;
         if (*postParsePosition == '.') {
             currentPosition = postParsePosition + 1;
@@ -561,12 +561,12 @@
             // a reasonable interpretation guided by the given examples and RFC 3339 says "no".
             // We check the next character to avoid reading +/- timezone hours after an invalid decimal.
             if (!isASCIIDigit(*currentPosition))
-                return 0;
+                return nullptr;
             
             // We are more lenient than ES5 by accepting more or less than 3 fraction digits.
             long fracSeconds;
             if (!parseLong(currentPosition, &postParsePosition, 10, &fracSeconds))
-                return 0;
+                return nullptr;
             
             long numFracDigits = postParsePosition - currentPosition;
             seconds += fracSeconds * pow(10.0, static_cast<double>(-numFracDigits));
@@ -594,9 +594,9 @@
     long tzMinutes = 0;
     
     if (!isASCIIDigit(*currentPosition))
-        return 0;
+        return nullptr;
     if (!parseLong(currentPosition, &postParsePosition, 10, &tzHours))
-        return 0;
+        return nullptr;
     if (*postParsePosition != ':') {
         if ((postParsePosition - currentPosition) == 2) {
             // "00" case.
@@ -607,27 +607,27 @@
             tzMinutes = tzHoursAbs % 100;
             tzHoursAbs = tzHoursAbs / 100;
         } else
-            return 0;
+            return nullptr;
     } else {
         // "00:00" case.
         if ((postParsePosition - currentPosition) != 2)
-            return 0;
+            return nullptr;
         tzHoursAbs = labs(tzHours);
         currentPosition = postParsePosition + 1; // Skip ":".
     
         if (!isASCIIDigit(*currentPosition))
-            return 0;
+            return nullptr;
         if (!parseLong(currentPosition, &postParsePosition, 10, &tzMinutes))
-            return 0;
+            return nullptr;
         if ((postParsePosition - currentPosition) != 2)
-            return 0;
+            return nullptr;
     }
     currentPosition = postParsePosition;
     
     if (tzHoursAbs > 24)
-        return 0;
+        return nullptr;
     if (tzMinutes < 0 || tzMinutes > 59)
-        return 0;
+        return nullptr;
     
     timeZoneSeconds = 60 * (tzMinutes + (60 * tzHoursAbs));
     if (tzNegative)

Modified: trunk/Source/WTF/wtf/FastMalloc.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/FastMalloc.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/FastMalloc.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -109,7 +109,7 @@
 {
     void* result;
     if (!tryFastMalloc(n).getValue(result))
-        return 0;
+        return nullptr;
     memset(result, 0, n);
     return result;
 }

Modified: trunk/Source/WTF/wtf/HashTable.h (261392 => 261393)


--- trunk/Source/WTF/wtf/HashTable.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/HashTable.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -694,10 +694,10 @@
                     return entry;
                 
                 if (isEmptyBucket(*entry))
-                    return 0;
+                    return nullptr;
             } else {
                 if (isEmptyBucket(*entry))
-                    return 0;
+                    return nullptr;
                 
                 if (!isDeletedBucket(*entry) && HashTranslator::equal(Extractor::extract(*entry), key))
                     return entry;
@@ -739,7 +739,7 @@
         ++m_stats->numAccesses;
 #endif
 
-        ValueType* deletedEntry = 0;
+        ValueType* deletedEntry = nullptr;
 
         while (1) {
             ValueType* entry = table + i;
@@ -800,7 +800,7 @@
         ++m_stats->numAccesses;
 #endif
 
-        ValueType* deletedEntry = 0;
+        ValueType* deletedEntry = nullptr;
 
         while (1) {
             ValueType* entry = table + i;
@@ -947,7 +947,7 @@
         ++m_stats->numAccesses;
 #endif
 
-        ValueType* deletedEntry = 0;
+        ValueType* deletedEntry = nullptr;
         ValueType* entry;
         while (1) {
             entry = table + i;

Modified: trunk/Source/WTF/wtf/MetaAllocator.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/MetaAllocator.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/MetaAllocator.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -213,7 +213,7 @@
     FreeSpaceNode* node = m_freeSpaceSizeMap.findLeastGreaterThanOrEqual(sizeInBytes);
     
     if (!node)
-        return 0;
+        return nullptr;
     
     size_t nodeSizeInBytes = node->sizeInBytes();
     ASSERT(nodeSizeInBytes >= sizeInBytes);

Modified: trunk/Source/WTF/wtf/ParallelJobsGeneric.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/ParallelJobsGeneric.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/ParallelJobsGeneric.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -34,7 +34,7 @@
 
 namespace WTF {
 
-Vector< RefPtr<ParallelEnvironment::ThreadPrivate> >* ParallelEnvironment::s_threadPool = 0;
+Vector< RefPtr<ParallelEnvironment::ThreadPrivate> >* ParallelEnvironment::s_threadPool = nullptr;
 
 ParallelEnvironment::ParallelEnvironment(ThreadFunction threadFunction, size_t sizeOfParameter, int requestedJobNumber) :
     m_threadFunction(threadFunction),

Modified: trunk/Source/WTF/wtf/RandomDevice.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/RandomDevice.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/RandomDevice.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -108,7 +108,7 @@
     // FIXME: We cannot ensure that Cryptographic Service Provider context and CryptGenRandom are safe across threads.
     // If it is safe, we can acquire context per RandomDevice.
     HCRYPTPROV hCryptProv = 0;
-    if (!CryptAcquireContext(&hCryptProv, 0, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
+    if (!CryptAcquireContext(&hCryptProv, nullptr, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
         CRASH();
     if (!CryptGenRandom(hCryptProv, length, buffer))
         CRASH();

Modified: trunk/Source/WTF/wtf/RawPointer.h (261392 => 261393)


--- trunk/Source/WTF/wtf/RawPointer.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/RawPointer.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -30,7 +30,7 @@
 class RawPointer {
 public:
     RawPointer()
-        : m_value(0)
+        : m_value(nullptr)
     {
     }
     

Modified: trunk/Source/WTF/wtf/RedBlackTree.h (261392 => 261393)


--- trunk/Source/WTF/wtf/RedBlackTree.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/RedBlackTree.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -95,8 +95,8 @@
     private:
         void reset()
         {
-            m_left = 0;
-            m_right = 0;
+            m_left = nullptr;
+            m_right = nullptr;
             m_parentAndRed = 1; // initialize to red
         }
         
@@ -153,7 +153,7 @@
     };
 
     RedBlackTree()
-        : m_root(0)
+        : m_root(nullptr)
     {
     }
     
@@ -296,7 +296,7 @@
     
     NodeType* findLeastGreaterThanOrEqual(const KeyType& key) const
     {
-        NodeType* best = 0;
+        NodeType* best = nullptr;
         for (NodeType* current = m_root; current;) {
             if (current->key() == key)
                 return current;
@@ -312,7 +312,7 @@
     
     NodeType* findGreatestLessThanOrEqual(const KeyType& key) const
     {
-        NodeType* best = 0;
+        NodeType* best = nullptr;
         for (NodeType* current = m_root; current;) {
             if (current->key() == key)
                 return current;
@@ -349,7 +349,7 @@
     NodeType* first() const
     {
         if (!m_root)
-            return 0;
+            return nullptr;
         return treeMinimum(m_root);
     }
     
@@ -413,7 +413,7 @@
         ASSERT(!z->parent());
         ASSERT(z->color() == Red);
         
-        NodeType* y = 0;
+        NodeType* y = nullptr;
         NodeType* x = m_root;
         while (x) {
             y = x;

Modified: trunk/Source/WTF/wtf/SHA1.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/SHA1.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/SHA1.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -204,7 +204,7 @@
 
 CString SHA1::hexDigest(const Digest& digest)
 {
-    char* start = 0;
+    char* start = nullptr;
     CString result = CString::newUninitialized(40, start);
     char* buffer = start;
     for (size_t i = 0; i < hashSize; ++i) {

Modified: trunk/Source/WTF/wtf/SchedulePair.h (261392 => 261393)


--- trunk/Source/WTF/wtf/SchedulePair.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/SchedulePair.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -58,7 +58,7 @@
         : m_runLoop(runLoop)
     {
         if (mode)
-            m_mode = adoptCF(CFStringCreateCopy(0, mode));
+            m_mode = adoptCF(CFStringCreateCopy(nullptr, mode));
     }
 
 #if PLATFORM(COCOA)

Modified: trunk/Source/WTF/wtf/StackTrace.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/StackTrace.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/StackTrace.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -49,7 +49,7 @@
 #if HAVE(BACKTRACE)
     *size = backtrace(stack, *size);
 #elif OS(WINDOWS)
-    *size = RtlCaptureStackBackTrace(0, *size, stack, 0);
+    *size = RtlCaptureStackBackTrace(0, *size, stack, nullptr);
 #else
     UNUSED_PARAM(stack);
     *size = 0;
@@ -131,7 +131,7 @@
 #if HAVE(BACKTRACE_SYMBOLS)
         mangledName = symbols[i];
 #elif OS(WINDOWS)
-        if (DbgHelper::SymFromAddress(hProc, reinterpret_cast<DWORD64>(stack[i]), 0, symbolInfo))
+        if (DbgHelper::SymFromAddress(hProc, reinterpret_cast<DWORD64>(stack[i]), nullptr, symbolInfo))
             mangledName = symbolInfo->Name;
 #endif
         auto demangled = demangle(stack[i]);

Modified: trunk/Source/WTF/wtf/StringExtras.h (261392 => 261393)


--- trunk/Source/WTF/wtf/StringExtras.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/StringExtras.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -39,7 +39,7 @@
         if (*start == *target && strncmp(start + 1, target + 1, targetLength - 1) == 0)
             return const_cast<char*>(start);
     }
-    return 0;
+    return nullptr;
 }
 
 #endif

Modified: trunk/Source/WTF/wtf/Variant.h (261392 => 261393)


--- trunk/Source/WTF/wtf/Variant.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/Variant.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -1309,7 +1309,7 @@
 
 template <typename _Type> struct __is_swappable {
     static constexpr bool value =
-        sizeof(__swap_test_detail::__test<_Type>(0)) != 1;
+        sizeof(__swap_test_detail::__test<_Type>(nullptr)) != 1;
 };
 
 template<typename ... _Types>

Modified: trunk/Source/WTF/wtf/Vector.h (261392 => 261393)


--- trunk/Source/WTF/wtf/Vector.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/Vector.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -328,7 +328,7 @@
             return;
         
         if (m_buffer == bufferToDeallocate) {
-            m_buffer = 0;
+            m_buffer = nullptr;
             m_capacity = 0;
         }
 
@@ -343,7 +343,7 @@
     MallocPtr<T, Malloc> releaseBuffer()
     {
         T* buffer = m_buffer;
-        m_buffer = 0;
+        m_buffer = nullptr;
         m_capacity = 0;
         return adoptMallocPtr<T, Malloc>(buffer);
     }
@@ -350,7 +350,7 @@
 
 protected:
     VectorBufferBase()
-        : m_buffer(0)
+        : m_buffer(nullptr)
         , m_capacity(0)
         , m_size(0)
     {

Modified: trunk/Source/WTF/wtf/cf/CFURLExtras.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/cf/CFURLExtras.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/cf/CFURLExtras.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -37,15 +37,15 @@
     // (e.g calls to NSURL -path). However, this function is not tolerant of illegal UTF-8 sequences, which
     // could either be a malformed string or bytes in a different encoding, like Shift-JIS, so we fall back
     // onto using ISO Latin-1 in those cases.
-    RetainPtr<CFURLRef> result = adoptCF(CFURLCreateAbsoluteURLWithBytes(0, reinterpret_cast<const UInt8*>(data), size, kCFStringEncodingUTF8, baseURL, true));
+    RetainPtr<CFURLRef> result = adoptCF(CFURLCreateAbsoluteURLWithBytes(nullptr, reinterpret_cast<const UInt8*>(data), size, kCFStringEncodingUTF8, baseURL, true));
     if (!result)
-        result = adoptCF(CFURLCreateAbsoluteURLWithBytes(0, reinterpret_cast<const UInt8*>(data), size, kCFStringEncodingISOLatin1, baseURL, true));
+        result = adoptCF(CFURLCreateAbsoluteURLWithBytes(nullptr, reinterpret_cast<const UInt8*>(data), size, kCFStringEncodingISOLatin1, baseURL, true));
     return result;
 }
 
 void getURLBytes(CFURLRef url, URLCharBuffer& result)
 {
-    CFIndex bytesLength = CFURLGetBytes(url, 0, 0);
+    CFIndex bytesLength = CFURLGetBytes(url, nullptr, 0);
     result.resize(bytesLength);
     CFIndex finalLength = CFURLGetBytes(url, reinterpret_cast<UInt8*>(result.data()), bytesLength);
     ASSERT_UNUSED(finalLength, finalLength == bytesLength);
@@ -53,7 +53,7 @@
 
 void getURLBytes(CFURLRef url, CString& result)
 {
-    CFIndex bytesLength = CFURLGetBytes(url, 0, 0);
+    CFIndex bytesLength = CFURLGetBytes(url, nullptr, 0);
     char* bytes;
     result = CString::newUninitialized(bytesLength, bytes);
     CFIndex finalLength = CFURLGetBytes(url, reinterpret_cast<UInt8*>(bytes), bytesLength);

Modified: trunk/Source/WTF/wtf/cf/CFURLExtras.h (261392 => 261393)


--- trunk/Source/WTF/wtf/cf/CFURLExtras.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/cf/CFURLExtras.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -34,7 +34,7 @@
 class URL;
 typedef Vector<char, 512> URLCharBuffer;
 
-WTF_EXPORT_PRIVATE RetainPtr<CFURLRef> createCFURLFromBuffer(const char*, size_t, CFURLRef baseURL = 0);
+WTF_EXPORT_PRIVATE RetainPtr<CFURLRef> createCFURLFromBuffer(const char*, size_t, CFURLRef baseURL = nullptr);
 WTF_EXPORT_PRIVATE void getURLBytes(CFURLRef, URLCharBuffer&);
 WTF_EXPORT_PRIVATE void getURLBytes(CFURLRef, CString&);
 

Modified: trunk/Source/WTF/wtf/cf/FileSystemCF.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/cf/FileSystemCF.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/cf/FileSystemCF.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -68,7 +68,7 @@
 #else
     pathStyle = kCFURLPOSIXPathStyle;
 #endif
-    return adoptCF(CFURLCreateWithFileSystemPath(0, path.createCFString().get(), pathStyle, FALSE));
+    return adoptCF(CFURLCreateWithFileSystemPath(nullptr, path.createCFString().get(), pathStyle, FALSE));
 }
 
 } // namespace WTF

Modified: trunk/Source/WTF/wtf/dtoa/double-conversion.cc (261392 => 261393)


--- trunk/Source/WTF/wtf/dtoa/double-conversion.cc	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/dtoa/double-conversion.cc	2020-05-08 17:31:54 UTC (rev 261393)
@@ -62,7 +62,7 @@
     StringBuilder* result_builder) const {
   Double double_inspect(value);
   if (double_inspect.IsInfinite()) {
-    if (infinity_symbol_ == NULL) return false;
+    if (infinity_symbol_ == nullptr) return false;
     if (value < 0) {
       result_builder->AddCharacter('-');
     }
@@ -70,7 +70,7 @@
     return true;
   }
   if (double_inspect.IsNan()) {
-    if (nan_symbol_ == NULL) return false;
+    if (nan_symbol_ == nullptr) return false;
     result_builder->AddString(nan_symbol_);
     return true;
   }

Modified: trunk/Source/WTF/wtf/dtoa/utils.h (261392 => 261393)


--- trunk/Source/WTF/wtf/dtoa/utils.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/dtoa/utils.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -192,7 +192,7 @@
 template <typename T>
 class BufferReference {
  public:
-  BufferReference() : start_(NULL), length_(0) {}
+  BufferReference() : start_(nullptr), length_(0) {}
   BufferReference(T* data, int len) : start_(data), length_(len) {
     ASSERT(len == 0 || (len > 0 && data != NULL));
   }

Modified: trunk/Source/WTF/wtf/text/CString.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/text/CString.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/CString.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -76,7 +76,7 @@
 {
     copyBufferIfNeeded();
     if (!m_buffer)
-        return 0;
+        return nullptr;
     return m_buffer->mutableData();
 }
 

Modified: trunk/Source/WTF/wtf/text/CString.h (261392 => 261393)


--- trunk/Source/WTF/wtf/text/CString.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/CString.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -67,7 +67,7 @@
 
     const char* data() const
     {
-        return m_buffer ? m_buffer->data() : 0;
+        return m_buffer ? m_buffer->data() : nullptr;
     }
     WTF_EXPORT_PRIVATE char* mutableData();
     size_t length() const

Modified: trunk/Source/WTF/wtf/text/StringBuffer.h (261392 => 261393)


--- trunk/Source/WTF/wtf/text/StringBuffer.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/StringBuffer.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -79,7 +79,7 @@
     MallocPtr<CharType, StringBufferMalloc> release()
     {
         CharType* data = ""
-        m_data = 0;
+        m_data = nullptr;
         return adoptMallocPtr<CharType, StringBufferMalloc>(data);
     }
 

Modified: trunk/Source/WTF/wtf/text/StringImpl.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/text/StringImpl.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/StringImpl.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -182,7 +182,7 @@
 template<typename CharacterType> inline Ref<StringImpl> StringImpl::createUninitializedInternal(unsigned length, CharacterType*& data)
 {
     if (!length) {
-        data = ""
+        data = ""
         return *empty();
     }
     return createUninitializedInternalNonEmpty(length, data);
@@ -218,7 +218,7 @@
     ASSERT(originalString->bufferOwnership() == BufferInternal);
 
     if (!length) {
-        data = ""
+        data = ""
         return Ref<StringImpl>(*empty());
     }
 

Modified: trunk/Source/WTF/wtf/text/StringImpl.h (261392 => 261393)


--- trunk/Source/WTF/wtf/text/StringImpl.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/StringImpl.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -390,23 +390,23 @@
     UChar operator[](unsigned i) const { return at(i); }
     WTF_EXPORT_PRIVATE UChar32 characterStartingAt(unsigned);
 
-    int toIntStrict(bool* ok = 0, int base = 10);
-    unsigned toUIntStrict(bool* ok = 0, int base = 10);
-    int64_t toInt64Strict(bool* ok = 0, int base = 10);
-    uint64_t toUInt64Strict(bool* ok = 0, int base = 10);
-    intptr_t toIntPtrStrict(bool* ok = 0, int base = 10);
+    int toIntStrict(bool* ok = nullptr, int base = 10);
+    unsigned toUIntStrict(bool* ok = nullptr, int base = 10);
+    int64_t toInt64Strict(bool* ok = nullptr, int base = 10);
+    uint64_t toUInt64Strict(bool* ok = nullptr, int base = 10);
+    intptr_t toIntPtrStrict(bool* ok = nullptr, int base = 10);
 
-    WTF_EXPORT_PRIVATE int toInt(bool* ok = 0); // ignores trailing garbage
-    unsigned toUInt(bool* ok = 0); // ignores trailing garbage
-    int64_t toInt64(bool* ok = 0); // ignores trailing garbage
-    uint64_t toUInt64(bool* ok = 0); // ignores trailing garbage
-    intptr_t toIntPtr(bool* ok = 0); // ignores trailing garbage
+    WTF_EXPORT_PRIVATE int toInt(bool* ok = nullptr); // ignores trailing garbage
+    unsigned toUInt(bool* ok = nullptr); // ignores trailing garbage
+    int64_t toInt64(bool* ok = nullptr); // ignores trailing garbage
+    uint64_t toUInt64(bool* ok = nullptr); // ignores trailing garbage
+    intptr_t toIntPtr(bool* ok = nullptr); // ignores trailing garbage
 
     // FIXME: Like the strict functions above, these give false for "ok" when there is trailing garbage.
     // Like the non-strict functions above, these return the value when there is trailing garbage.
     // It would be better if these were more consistent with the above functions instead.
-    double toDouble(bool* ok = 0);
-    float toFloat(bool* ok = 0);
+    double toDouble(bool* ok = nullptr);
+    float toFloat(bool* ok = nullptr);
 
     WTF_EXPORT_PRIVATE Ref<StringImpl> convertToASCIILowercase();
     WTF_EXPORT_PRIVATE Ref<StringImpl> convertToASCIIUppercase();

Modified: trunk/Source/WTF/wtf/text/TextBreakIterator.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/text/TextBreakIterator.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/TextBreakIterator.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -64,7 +64,7 @@
 static UBreakIterator* initializeIterator(UBreakIteratorType type, const char* locale = currentTextBreakLocaleID())
 {
     UErrorCode openStatus = U_ZERO_ERROR;
-    UBreakIterator* iterator = ubrk_open(type, locale, 0, 0, &openStatus);
+    UBreakIterator* iterator = ubrk_open(type, locale, nullptr, 0, &openStatus);
     ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus);
     return iterator;
 }
@@ -134,7 +134,7 @@
         UText* text = openUTF16ContextAwareUTextProvider(&textLocal, string.characters16(), string.length(), priorContext, priorContextLength, &openStatus);
         if (U_FAILURE(openStatus)) {
             LOG_ERROR("openUTF16ContextAwareUTextProvider failed with status %d", openStatus);
-            return 0;
+            return nullptr;
         }
 
         UErrorCode setTextStatus = U_ZERO_ERROR;
@@ -191,12 +191,12 @@
 {
     bool localeIsEmpty = locale.isEmpty();
     UErrorCode openStatus = U_ZERO_ERROR;
-    UBreakIterator* ubrkIter = ubrk_open(UBRK_LINE, localeIsEmpty ? currentTextBreakLocaleID() : locale.string().utf8().data(), 0, 0, &openStatus);
+    UBreakIterator* ubrkIter = ubrk_open(UBRK_LINE, localeIsEmpty ? currentTextBreakLocaleID() : locale.string().utf8().data(), nullptr, 0, &openStatus);
     // locale comes from a web page and it can be invalid, leading ICU
     // to fail, in which case we fall back to the default locale.
     if (!localeIsEmpty && U_FAILURE(openStatus)) {
         openStatus = U_ZERO_ERROR;
-        ubrkIter = ubrk_open(UBRK_LINE, currentTextBreakLocaleID(), 0, 0, &openStatus);
+        ubrkIter = ubrk_open(UBRK_LINE, currentTextBreakLocaleID(), nullptr, 0, &openStatus);
     }
 
     if (U_FAILURE(openStatus)) {

Modified: trunk/Source/WTF/wtf/text/TextBreakIterator.h (261392 => 261393)


--- trunk/Source/WTF/wtf/text/TextBreakIterator.h	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/TextBreakIterator.h	2020-05-08 17:31:54 UTC (rev 261393)
@@ -285,7 +285,7 @@
     UBreakIterator* get(unsigned priorContextLength)
     {
         ASSERT(priorContextLength <= priorContextCapacity);
-        const UChar* priorContext = priorContextLength ? &m_priorContext[priorContextCapacity - priorContextLength] : 0;
+        const UChar* priorContext = priorContextLength ? &m_priorContext[priorContextCapacity - priorContextLength] : nullptr;
         if (!m_iterator) {
             m_iterator = acquireLineBreakIterator(m_stringView, m_locale, priorContext, priorContextLength, m_mode);
             m_cachedPriorContext = priorContext;

Modified: trunk/Source/WTF/wtf/text/WTFString.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/text/WTFString.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/WTFString.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -1073,13 +1073,13 @@
 float charactersToFloat(const LChar* data, size_t length, size_t& parsedLength)
 {
     // FIXME: This will return ok even when the string fits into a double but not a float.
-    return static_cast<float>(toDoubleType<LChar, AllowTrailingJunk>(data, length, 0, parsedLength));
+    return static_cast<float>(toDoubleType<LChar, AllowTrailingJunk>(data, length, nullptr, parsedLength));
 }
 
 float charactersToFloat(const UChar* data, size_t length, size_t& parsedLength)
 {
     // FIXME: This will return ok even when the string fits into a double but not a float.
-    return static_cast<float>(toDoubleType<UChar, AllowTrailingJunk>(data, length, 0, parsedLength));
+    return static_cast<float>(toDoubleType<UChar, AllowTrailingJunk>(data, length, nullptr, parsedLength));
 }
 
 const String& emptyString()

Modified: trunk/Source/WTF/wtf/text/cf/StringImplCF.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/text/cf/StringImplCF.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/cf/StringImplCF.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -57,11 +57,11 @@
 
     static void* allocate(CFIndex size, CFOptionFlags, void*)
     {
-        StringImpl* underlyingString = 0;
+        StringImpl* underlyingString = nullptr;
         if (isMainThread()) {
             underlyingString = currentString;
             if (underlyingString) {
-                currentString = 0;
+                currentString = nullptr;
                 underlyingString->ref(); // Balanced by call to deref in deallocate below.
             }
         }
@@ -113,8 +113,8 @@
 
     static CFAllocatorRef create()
     {
-        CFAllocatorContext context = { 0, 0, retain, release, copyDescription, allocate, reallocate, deallocate, preferredSize };
-        return CFAllocatorCreate(0, &context);
+        CFAllocatorContext context = { 0, nullptr, retain, release, copyDescription, allocate, reallocate, deallocate, preferredSize };
+        return CFAllocatorCreate(nullptr, &context);
     }
 
     static CFAllocatorRef allocator()
@@ -129,8 +129,8 @@
 {
     if (!m_length || !isMainThread()) {
         if (is8Bit())
-            return adoptCF(CFStringCreateWithBytes(0, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false));
-        return adoptCF(CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(characters16()), m_length));
+            return adoptCF(CFStringCreateWithBytes(nullptr, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false));
+        return adoptCF(CFStringCreateWithCharacters(nullptr, reinterpret_cast<const UniChar*>(characters16()), m_length));
     }
     CFAllocatorRef allocator = StringWrapperCFAllocator::allocator();
 
@@ -144,7 +144,7 @@
     else
         string = CFStringCreateWithCharactersNoCopy(allocator, reinterpret_cast<const UniChar*>(characters16()), m_length, kCFAllocatorNull);
     // CoreFoundation might not have to allocate anything, we clear currentString in case we did not execute allocate().
-    StringWrapperCFAllocator::currentString = 0;
+    StringWrapperCFAllocator::currentString = nullptr;
 
     return adoptCF(string);
 }

Modified: trunk/Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -65,7 +65,7 @@
     ASSERT_UNUSED(deep, !deep);
 
     if (U_FAILURE(*status))
-        return 0;
+        return nullptr;
 
     UText* result = utext_setup(destination, sizeof(UChar) * UTextWithBufferInlineCapacity, status);
     if (U_FAILURE(*status))
@@ -377,15 +377,15 @@
 UText* openLatin1ContextAwareUTextProvider(UTextWithBuffer* utWithBuffer, const LChar* string, unsigned length, const UChar* priorContext, int priorContextLength, UErrorCode* status)
 {
     if (U_FAILURE(*status))
-        return 0;
+        return nullptr;
     if (!string || length > static_cast<unsigned>(std::numeric_limits<int32_t>::max())) {
         *status = U_ILLEGAL_ARGUMENT_ERROR;
-        return 0;
+        return nullptr;
     }
     UText* text = utext_setup(&utWithBuffer->text, sizeof(utWithBuffer->buffer), status);
     if (U_FAILURE(*status)) {
         ASSERT(!text);
-        return 0;
+        return nullptr;
     }
 
     initializeContextAwareUTextProvider(text, &textLatin1ContextAwareFuncs, string, length, priorContext, priorContextLength);

Modified: trunk/Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -166,15 +166,15 @@
 UText* openUTF16ContextAwareUTextProvider(UText* text, const UChar* string, unsigned length, const UChar* priorContext, int priorContextLength, UErrorCode* status)
 {
     if (U_FAILURE(*status))
-        return 0;
+        return nullptr;
     if (!string || length > static_cast<unsigned>(std::numeric_limits<int32_t>::max())) {
         *status = U_ILLEGAL_ARGUMENT_ERROR;
-        return 0;
+        return nullptr;
     }
     text = utext_setup(text, 0, status);
     if (U_FAILURE(*status)) {
         ASSERT(!text);
-        return 0;
+        return nullptr;
     }
 
     initializeContextAwareUTextProvider(text, &textUTF16ContextAwareFuncs, string, length, priorContext, priorContextLength);

Modified: trunk/Source/WTF/wtf/win/FileSystemWin.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/win/FileSystemWin.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/win/FileSystemWin.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -294,7 +294,7 @@
 bool makeAllDirectories(const String& path)
 {
     String fullPath = path;
-    if (SHCreateDirectoryEx(0, fullPath.wideCharacters().data(), 0) != ERROR_SUCCESS) {
+    if (SHCreateDirectoryEx(nullptr, fullPath.wideCharacters().data(), nullptr) != ERROR_SUCCESS) {
         DWORD error = GetLastError();
         if (error != ERROR_FILE_EXISTS && error != ERROR_ALREADY_EXISTS) {
             LOG_ERROR("Failed to create path %s", path.ascii().data());
@@ -348,7 +348,7 @@
 static String storageDirectory(DWORD pathIdentifier)
 {
     Vector<UChar> buffer(MAX_PATH);
-    if (FAILED(SHGetFolderPathW(0, pathIdentifier | CSIDL_FLAG_CREATE, 0, 0, wcharFrom(buffer.data()))))
+    if (FAILED(SHGetFolderPathW(nullptr, pathIdentifier | CSIDL_FLAG_CREATE, nullptr, 0, wcharFrom(buffer.data()))))
         return String();
 
     buffer.shrink(wcslen(wcharFrom(buffer.data())));
@@ -410,7 +410,7 @@
 
     String proposedPath = generateTemporaryPath([&handle](const String& proposedPath) {
         // use CREATE_NEW to avoid overwriting an existing file with the same name
-        handle = ::CreateFileW(proposedPath.wideCharacters().data(), GENERIC_READ | GENERIC_WRITE, 0, 0, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0);
+        handle = ::CreateFileW(proposedPath.wideCharacters().data(), GENERIC_READ | GENERIC_WRITE, 0, nullptr, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, nullptr);
 
         return isHandleValid(handle) || GetLastError() == ERROR_ALREADY_EXISTS;
     });
@@ -446,7 +446,7 @@
         creationDisposition = CREATE_NEW;
 
     String destination = path;
-    return CreateFile(destination.wideCharacters().data(), desiredAccess, shareMode, 0, creationDisposition, FILE_ATTRIBUTE_NORMAL, 0);
+    return CreateFile(destination.wideCharacters().data(), desiredAccess, shareMode, nullptr, creationDisposition, FILE_ATTRIBUTE_NORMAL, nullptr);
 }
 
 void closeFile(PlatformFileHandle& handle)
@@ -491,7 +491,7 @@
         return -1;
 
     DWORD bytesWritten;
-    bool success = WriteFile(handle, data, length, &bytesWritten, 0);
+    bool success = WriteFile(handle, data, length, &bytesWritten, nullptr);
 
     if (!success)
         return -1;
@@ -504,7 +504,7 @@
         return -1;
 
     DWORD bytesRead;
-    bool success = ::ReadFile(handle, data, length, &bytesRead, 0);
+    bool success = ::ReadFile(handle, data, length, &bytesRead, nullptr);
 
     if (!success)
         return -1;
@@ -602,7 +602,7 @@
         L"",
         FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT,
         false,
-        0,
+        nullptr,
         L""
     };
     return !SHFileOperation(&deleteOperation);

Modified: trunk/Source/WTF/wtf/win/LanguageWin.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/win/LanguageWin.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/win/LanguageWin.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -40,7 +40,7 @@
 static String localeInfo(LCTYPE localeType, const String& fallback)
 {
     LANGID langID = GetUserDefaultUILanguage();
-    int localeChars = GetLocaleInfo(langID, localeType, 0, 0);
+    int localeChars = GetLocaleInfo(langID, localeType, nullptr, 0);
     if (!localeChars)
         return fallback;
     UChar* localeNameBuf;

Modified: trunk/Source/WTF/wtf/win/MainThreadWin.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/win/MainThreadWin.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/win/MainThreadWin.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -62,8 +62,8 @@
     wcex.lpszClassName  = kThreadingWindowClassName;
     RegisterClassW(&wcex);
 
-    threadingWindowHandle = CreateWindowW(kThreadingWindowClassName, 0, 0,
-        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, 0, 0);
+    threadingWindowHandle = CreateWindowW(kThreadingWindowClassName, nullptr, 0,
+        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, nullptr, nullptr, nullptr);
     threadingFiredMessage = RegisterWindowMessageW(L"com.apple.WebKit.MainThreadFired");
 
     mainThread = Thread::currentID();

Modified: trunk/Source/WTF/wtf/win/OSAllocatorWin.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/win/OSAllocatorWin.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/win/OSAllocatorWin.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -40,7 +40,7 @@
 
 void* OSAllocator::reserveUncommitted(size_t bytes, Usage, bool writable, bool executable, bool)
 {
-    void* result = VirtualAlloc(0, bytes, MEM_RESERVE, protection(writable, executable));
+    void* result = VirtualAlloc(nullptr, bytes, MEM_RESERVE, protection(writable, executable));
     if (!result)
         CRASH();
     return result;
@@ -48,7 +48,7 @@
 
 void* OSAllocator::reserveAndCommit(size_t bytes, Usage, bool writable, bool executable, bool)
 {
-    void* result = VirtualAlloc(0, bytes, MEM_RESERVE | MEM_COMMIT, protection(writable, executable));
+    void* result = VirtualAlloc(nullptr, bytes, MEM_RESERVE | MEM_COMMIT, protection(writable, executable));
     if (!result)
         CRASH();
     return result;

Modified: trunk/Source/WTF/wtf/win/RunLoopWin.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/win/RunLoopWin.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/win/RunLoopWin.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -66,7 +66,7 @@
 void RunLoop::run()
 {
     MSG message;
-    while (BOOL result = ::GetMessage(&message, 0, 0, 0)) {
+    while (BOOL result = ::GetMessage(&message, nullptr, 0, 0)) {
         if (result == -1)
             break;
         ::TranslateMessage(&message);
@@ -77,7 +77,7 @@
 void RunLoop::iterate()
 {
     MSG message;
-    while (::PeekMessage(&message, 0, 0, 0, PM_REMOVE)) {
+    while (::PeekMessage(&message, nullptr, 0, 0, PM_REMOVE)) {
         ::TranslateMessage(&message);
         ::DispatchMessage(&message);
     }
@@ -109,8 +109,8 @@
 
 RunLoop::RunLoop()
 {
-    m_runLoopMessageWindow = ::CreateWindow(kRunLoopMessageWindowClassName, 0, 0,
-        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, 0, this);
+    m_runLoopMessageWindow = ::CreateWindow(kRunLoopMessageWindowClassName, nullptr, 0,
+        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, nullptr, nullptr, this);
     ASSERT(::IsWindow(m_runLoopMessageWindow));
 }
 
@@ -131,7 +131,7 @@
 RunLoop::CycleResult RunLoop::cycle(RunLoopMode)
 {
     MSG message;
-    if (!::GetMessage(&message, 0, 0, 0))
+    if (!::GetMessage(&message, nullptr, 0, 0))
         return CycleResult::Stop;
 
     ::TranslateMessage(&message);
@@ -187,7 +187,7 @@
     m_isActive = true;
     m_interval = nextFireInterval;
     m_nextFireDate = MonotonicTime::now() + m_interval;
-    ::SetTimer(m_runLoop->m_runLoopMessageWindow, bitwise_cast<uintptr_t>(this), nextFireInterval.millisecondsAs<UINT>(), 0);
+    ::SetTimer(m_runLoop->m_runLoopMessageWindow, bitwise_cast<uintptr_t>(this), nextFireInterval.millisecondsAs<UINT>(), nullptr);
 }
 
 void RunLoop::TimerBase::stop()

Modified: trunk/Source/WTF/wtf/win/ThreadingWin.cpp (261392 => 261393)


--- trunk/Source/WTF/wtf/win/ThreadingWin.cpp	2020-05-08 17:30:34 UTC (rev 261392)
+++ trunk/Source/WTF/wtf/win/ThreadingWin.cpp	2020-05-08 17:31:54 UTC (rev 261393)
@@ -157,7 +157,7 @@
 {
     unsigned threadIdentifier = 0;
     unsigned initFlag = stackSize ? STACK_SIZE_PARAM_IS_A_RESERVATION : 0;
-    HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, stackSize.valueOr(0), wtfThreadEntryPoint, data, initFlag, &threadIdentifier));
+    HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(nullptr, stackSize.valueOr(0), wtfThreadEntryPoint, data, initFlag, &threadIdentifier));
     if (!threadHandle) {
         LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", wtfThreadEntryPoint, data, errno);
         return false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to