Changeset 261393 in webkit


Ignore:
Timestamp:
May 8, 2020 10:31:54 AM (4 years ago)
Author:
don.olmstead@sony.com
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):

Location:
trunk/Source/WTF
Files:
40 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r261386 r261393  
     12020-05-08  Don Olmstead  <don.olmstead@sony.com>
     2
     3        [clang-tidy] Run modernize-use-nullptr over WTF
     4        https://bugs.webkit.org/show_bug.cgi?id=211628
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        Use the fix option in clang-tidy to ensure nullptr is being used across WTF.
     9
     10        * wtf/Assertions.cpp:
     11        * wtf/BumpPointerAllocator.h:
     12        (WTF::BumpPointerPool::BumpPointerPool):
     13        (WTF::BumpPointerPool::create):
     14        (WTF::BumpPointerAllocator::BumpPointerAllocator):
     15        * wtf/DataLog.cpp:
     16        (WTF::setDataFile):
     17        * wtf/DateMath.cpp:
     18        (WTF::parseES5DatePortion):
     19        (WTF::parseES5TimePortion):
     20        * wtf/FastMalloc.cpp:
     21        (WTF::fastZeroedMalloc):
     22        (WTF::fastStrDup):
     23        (WTF::tryFastZeroedMalloc):
     24        (WTF::isFastMallocEnabled):
     25        (WTF::fastMallocGoodSize):
     26        (WTF::fastAlignedMalloc):
     27        (WTF::tryFastAlignedMalloc):
     28        (WTF::fastAlignedFree):
     29        (WTF::tryFastMalloc):
     30        (WTF::fastMalloc):
     31        (WTF::tryFastCalloc):
     32        (WTF::fastCalloc):
     33        (WTF::fastFree):
     34        (WTF::fastRealloc):
     35        (WTF::tryFastRealloc):
     36        (WTF::releaseFastMallocFreeMemory):
     37        (WTF::releaseFastMallocFreeMemoryForThisThread):
     38        (WTF::fastMallocStatistics):
     39        (WTF::fastMallocSize):
     40        (WTF::fastCommitAlignedMemory):
     41        (WTF::fastDecommitAlignedMemory):
     42        (WTF::fastEnableMiniMode):
     43        (WTF::fastDisableScavenger):
     44        (WTF::fastMallocDumpMallocStats):
     45        (WTF::AvoidRecordingScope::avoidRecordingCount):
     46        (WTF::AvoidRecordingScope::AvoidRecordingScope):
     47        (WTF::AvoidRecordingScope::~AvoidRecordingScope):
     48        (WTF::MallocCallTracker::MallocSiteData::MallocSiteData):
     49        (WTF::MallocCallTracker::singleton):
     50        (WTF::MallocCallTracker::MallocCallTracker):
     51        (WTF::MallocCallTracker::recordMalloc):
     52        (WTF::MallocCallTracker::recordRealloc):
     53        (WTF::MallocCallTracker::recordFree):
     54        (WTF::MallocCallTracker::dumpStats):
     55        * wtf/HashTable.h:
     56        (WTF::KeyTraits>::inlineLookup):
     57        (WTF::KeyTraits>::lookupForWriting):
     58        (WTF::KeyTraits>::fullLookupForWriting):
     59        (WTF::KeyTraits>::add):
     60        * wtf/MetaAllocator.cpp:
     61        (WTF::MetaAllocator::findAndRemoveFreeSpace):
     62        * wtf/ParallelJobsGeneric.cpp:
     63        * wtf/RandomDevice.cpp:
     64        (WTF::RandomDevice::cryptographicallyRandomValues):
     65        * wtf/RawPointer.h:
     66        (WTF::RawPointer::RawPointer):
     67        * wtf/RedBlackTree.h:
     68        * wtf/SHA1.cpp:
     69        (WTF::SHA1::hexDigest):
     70        * wtf/SchedulePair.h:
     71        (WTF::SchedulePair::SchedulePair):
     72        * wtf/StackTrace.cpp:
     73        (WTFGetBacktrace):
     74        (WTF::StackTrace::dump const):
     75        * wtf/StringExtras.h:
     76        (strnstr):
     77        * wtf/Variant.h:
     78        * wtf/Vector.h:
     79        (WTF::VectorBufferBase::deallocateBuffer):
     80        (WTF::VectorBufferBase::releaseBuffer):
     81        (WTF::VectorBufferBase::VectorBufferBase):
     82        * wtf/cf/CFURLExtras.cpp:
     83        (WTF::createCFURLFromBuffer):
     84        (WTF::getURLBytes):
     85        * wtf/cf/CFURLExtras.h:
     86        * wtf/cf/FileSystemCF.cpp:
     87        (WTF::FileSystem::pathAsURL):
     88        * wtf/dtoa/double-conversion.cc:
     89        * wtf/dtoa/utils.h:
     90        (WTF::double_conversion::BufferReference::BufferReference):
     91        * wtf/text/CString.cpp:
     92        (WTF::CString::mutableData):
     93        * wtf/text/CString.h:
     94        * wtf/text/StringBuffer.h:
     95        (WTF::StringBuffer::release):
     96        * wtf/text/StringImpl.cpp:
     97        (WTF::StringImpl::createUninitializedInternal):
     98        (WTF::StringImpl::reallocateInternal):
     99        * wtf/text/StringImpl.h:
     100        (WTF::StringImpl::constructInternal<LChar>):
     101        (WTF::StringImpl::constructInternal<UChar>):
     102        (WTF::StringImpl::characters<LChar> const):
     103        (WTF::StringImpl::characters<UChar> const):
     104        (WTF::find):
     105        (WTF::reverseFindLineTerminator):
     106        (WTF::reverseFind):
     107        (WTF::equalIgnoringNullity):
     108        (WTF::codePointCompare):
     109        (WTF::isSpaceOrNewline):
     110        (WTF::lengthOfNullTerminatedString):
     111        (WTF::StringImplShape::StringImplShape):
     112        (WTF::StringImpl::isolatedCopy const):
     113        (WTF::StringImpl::isAllASCII const):
     114        (WTF::StringImpl::isAllLatin1 const):
     115        (WTF::isAllSpecialCharacters):
     116        (WTF::isSpecialCharacter const):
     117        (WTF::StringImpl::StringImpl):
     118        (WTF::StringImpl::create8BitIfPossible):
     119        (WTF::StringImpl::createSubstringSharingImpl):
     120        (WTF::StringImpl::createFromLiteral):
     121        (WTF::StringImpl::tryCreateUninitialized):
     122        (WTF::StringImpl::adopt):
     123        (WTF::StringImpl::cost const):
     124        (WTF::StringImpl::costDuringGC):
     125        (WTF::StringImpl::setIsAtom):
     126        (WTF::StringImpl::setHash const):
     127        (WTF::StringImpl::ref):
     128        (WTF::StringImpl::deref):
     129        (WTF::StringImpl::copyCharacters):
     130        (WTF::StringImpl::at const):
     131        (WTF::StringImpl::allocationSize):
     132        (WTF::StringImpl::maxInternalLength):
     133        (WTF::StringImpl::tailOffset):
     134        (WTF::StringImpl::requiresCopy const):
     135        (WTF::StringImpl::tailPointer const):
     136        (WTF::StringImpl::tailPointer):
     137        (WTF::StringImpl::substringBuffer const):
     138        (WTF::StringImpl::substringBuffer):
     139        (WTF::StringImpl::assertHashIsCorrect const):
     140        (WTF::StringImpl::StaticStringImpl::StaticStringImpl):
     141        (WTF::StringImpl::StaticStringImpl::operator StringImpl&):
     142        (WTF::equalIgnoringASCIICase):
     143        (WTF::startsWithLettersIgnoringASCIICase):
     144        (WTF::equalLettersIgnoringASCIICase):
     145        * wtf/text/TextBreakIterator.cpp:
     146        (WTF::initializeIterator):
     147        (WTF::setContextAwareTextForIterator):
     148        (WTF::openLineBreakIterator):
     149        * wtf/text/TextBreakIterator.h:
     150        (WTF::LazyLineBreakIterator::get):
     151        * wtf/text/WTFString.cpp:
     152        (WTF::charactersToFloat):
     153        * wtf/text/cf/StringImplCF.cpp:
     154        (WTF::StringWrapperCFAllocator::allocate):
     155        (WTF::StringWrapperCFAllocator::create):
     156        (WTF::StringImpl::createCFString):
     157        * wtf/text/icu/UTextProviderLatin1.cpp:
     158        (WTF::uTextLatin1Clone):
     159        (WTF::openLatin1ContextAwareUTextProvider):
     160        * wtf/text/icu/UTextProviderUTF16.cpp:
     161        (WTF::openUTF16ContextAwareUTextProvider):
     162        * wtf/win/FileSystemWin.cpp:
     163        (WTF::FileSystemImpl::makeAllDirectories):
     164        (WTF::FileSystemImpl::storageDirectory):
     165        (WTF::FileSystemImpl::openTemporaryFile):
     166        (WTF::FileSystemImpl::openFile):
     167        (WTF::FileSystemImpl::writeToFile):
     168        (WTF::FileSystemImpl::readFromFile):
     169        (WTF::FileSystemImpl::deleteNonEmptyDirectory):
     170        * wtf/win/LanguageWin.cpp:
     171        (WTF::localeInfo):
     172        * wtf/win/MainThreadWin.cpp:
     173        (WTF::initializeMainThreadPlatform):
     174        * wtf/win/OSAllocatorWin.cpp:
     175        (WTF::OSAllocator::reserveUncommitted):
     176        (WTF::OSAllocator::reserveAndCommit):
     177        * wtf/win/RunLoopWin.cpp:
     178        (WTF::RunLoop::run):
     179        (WTF::RunLoop::iterate):
     180        (WTF::RunLoop::RunLoop):
     181        (WTF::RunLoop::cycle):
     182        (WTF::RunLoop::TimerBase::start):
     183        * wtf/win/ThreadingWin.cpp:
     184        (WTF::Thread::establishHandle):
     185
    11862020-05-08  Darin Adler  <darin@apple.com>
    2187
  • trunk/Source/WTF/wtf/Assertions.cpp

    r258547 r261393  
    312312    __builtin_trap();
    313313#else
    314     ((void(*)())0)();
     314    ((void(*)())nullptr)();
    315315#endif // COMPILER(GCC_COMPATIBLE)
    316316#endif // ASAN_ENABLED
     
    517517    }
    518518
    519     return 0;
     519    return nullptr;
    520520}
    521521
  • trunk/Source/WTF/wtf/BumpPointerAllocator.h

    r253061 r261393  
    100100        : m_current(allocation.base())
    101101        , m_start(allocation.base())
    102         , m_next(0)
    103         , m_previous(0)
     102        , m_next(nullptr)
     103        , m_previous(nullptr)
    104104        , m_allocation(allocation)
    105105    {
     
    111111        minimumCapacity += sizeof(BumpPointerPool);
    112112        if (minimumCapacity < sizeof(BumpPointerPool))
    113             return 0;
     113            return nullptr;
    114114
    115115        size_t poolSize = std::max(static_cast<size_t>(MINIMUM_BUMP_POOL_SIZE), WTF::pageSize());
     
    119119            ASSERT(!(MINIMUM_BUMP_POOL_SIZE & (MINIMUM_BUMP_POOL_SIZE - 1)));
    120120            if (!poolSize)
    121                 return 0;
     121                return nullptr;
    122122        }
    123123
     
    125125        if (!!allocation)
    126126            return new (allocation) BumpPointerPool(allocation);
    127         return 0;
     127        return nullptr;
    128128    }
    129129
     
    223223public:
    224224    BumpPointerAllocator()
    225         : m_head(0)
     225        : m_head(nullptr)
    226226    {
    227227    }
  • trunk/Source/WTF/wtf/DataLog.cpp

    r259400 r261393  
    157157    }
    158158
    159     setvbuf(file->file(), 0, _IONBF, 0); // Prefer unbuffered output, so that we get a full log upon crash or deadlock.
     159    setvbuf(file->file(), nullptr, _IONBF, 0); // Prefer unbuffered output, so that we get a full log upon crash or deadlock.
    160160
    161161    if (s_file)
  • trunk/Source/WTF/wtf/DateMath.cpp

    r254939 r261393  
    491491    // it accepts any integer value. Consider this an implementation fallback.
    492492    if (!parseInt(currentPosition, &postParsePosition, 10, &year))
    493         return 0;
     493        return nullptr;
    494494
    495495    // Check for presence of -MM portion.
     
    499499   
    500500    if (!isASCIIDigit(*currentPosition))
    501         return 0;
     501        return nullptr;
    502502    if (!parseLong(currentPosition, &postParsePosition, 10, &month))
    503         return 0;
     503        return nullptr;
    504504    if ((postParsePosition - currentPosition) != 2)
    505         return 0;
     505        return nullptr;
    506506
    507507    // Check for presence of -DD portion.
     
    511511   
    512512    if (!isASCIIDigit(*currentPosition))
    513         return 0;
     513        return nullptr;
    514514    if (!parseLong(currentPosition, &postParsePosition, 10, &day))
    515         return 0;
     515        return nullptr;
    516516    if ((postParsePosition - currentPosition) != 2)
    517         return 0;
     517        return nullptr;
    518518    return postParsePosition;
    519519}
     
    528528    char* postParsePosition;
    529529    if (!isASCIIDigit(*currentPosition))
    530         return 0;
     530        return nullptr;
    531531    if (!parseLong(currentPosition, &postParsePosition, 10, &hours))
    532         return 0;
     532        return nullptr;
    533533    if (*postParsePosition != ':' || (postParsePosition - currentPosition) != 2)
    534         return 0;
     534        return nullptr;
    535535    currentPosition = postParsePosition + 1;
    536536   
    537537    if (!isASCIIDigit(*currentPosition))
    538         return 0;
     538        return nullptr;
    539539    if (!parseLong(currentPosition, &postParsePosition, 10, &minutes))
    540         return 0;
     540        return nullptr;
    541541    if ((postParsePosition - currentPosition) != 2)
    542         return 0;
     542        return nullptr;
    543543    currentPosition = postParsePosition;
    544544
     
    549549        long intSeconds;
    550550        if (!isASCIIDigit(*currentPosition))
    551             return 0;
     551            return nullptr;
    552552        if (!parseLong(currentPosition, &postParsePosition, 10, &intSeconds))
    553             return 0;
     553            return nullptr;
    554554        if ((postParsePosition - currentPosition) != 2)
    555             return 0;
     555            return nullptr;
    556556        seconds = intSeconds;
    557557        if (*postParsePosition == '.') {
     
    562562            // We check the next character to avoid reading +/- timezone hours after an invalid decimal.
    563563            if (!isASCIIDigit(*currentPosition))
    564                 return 0;
     564                return nullptr;
    565565           
    566566            // We are more lenient than ES5 by accepting more or less than 3 fraction digits.
    567567            long fracSeconds;
    568568            if (!parseLong(currentPosition, &postParsePosition, 10, &fracSeconds))
    569                 return 0;
     569                return nullptr;
    570570           
    571571            long numFracDigits = postParsePosition - currentPosition;
     
    595595   
    596596    if (!isASCIIDigit(*currentPosition))
    597         return 0;
     597        return nullptr;
    598598    if (!parseLong(currentPosition, &postParsePosition, 10, &tzHours))
    599         return 0;
     599        return nullptr;
    600600    if (*postParsePosition != ':') {
    601601        if ((postParsePosition - currentPosition) == 2) {
     
    608608            tzHoursAbs = tzHoursAbs / 100;
    609609        } else
    610             return 0;
     610            return nullptr;
    611611    } else {
    612612        // "00:00" case.
    613613        if ((postParsePosition - currentPosition) != 2)
    614             return 0;
     614            return nullptr;
    615615        tzHoursAbs = labs(tzHours);
    616616        currentPosition = postParsePosition + 1; // Skip ":".
    617617   
    618618        if (!isASCIIDigit(*currentPosition))
    619             return 0;
     619            return nullptr;
    620620        if (!parseLong(currentPosition, &postParsePosition, 10, &tzMinutes))
    621             return 0;
     621            return nullptr;
    622622        if ((postParsePosition - currentPosition) != 2)
    623             return 0;
     623            return nullptr;
    624624    }
    625625    currentPosition = postParsePosition;
    626626   
    627627    if (tzHoursAbs > 24)
    628         return 0;
     628        return nullptr;
    629629    if (tzMinutes < 0 || tzMinutes > 59)
    630         return 0;
     630        return nullptr;
    631631   
    632632    timeZoneSeconds = 60 * (tzMinutes + (60 * tzHoursAbs));
  • trunk/Source/WTF/wtf/FastMalloc.cpp

    r260054 r261393  
    110110    void* result;
    111111    if (!tryFastMalloc(n).getValue(result))
    112         return 0;
     112        return nullptr;
    113113    memset(result, 0, n);
    114114    return result;
  • trunk/Source/WTF/wtf/HashTable.h

    r257721 r261393  
    695695               
    696696                if (isEmptyBucket(*entry))
    697                     return 0;
     697                    return nullptr;
    698698            } else {
    699699                if (isEmptyBucket(*entry))
    700                     return 0;
     700                    return nullptr;
    701701               
    702702                if (!isDeletedBucket(*entry) && HashTranslator::equal(Extractor::extract(*entry), key))
     
    740740#endif
    741741
    742         ValueType* deletedEntry = 0;
     742        ValueType* deletedEntry = nullptr;
    743743
    744744        while (1) {
     
    801801#endif
    802802
    803         ValueType* deletedEntry = 0;
     803        ValueType* deletedEntry = nullptr;
    804804
    805805        while (1) {
     
    948948#endif
    949949
    950         ValueType* deletedEntry = 0;
     950        ValueType* deletedEntry = nullptr;
    951951        ValueType* entry;
    952952        while (1) {
  • trunk/Source/WTF/wtf/MetaAllocator.cpp

    r259582 r261393  
    214214   
    215215    if (!node)
    216         return 0;
     216        return nullptr;
    217217   
    218218    size_t nodeSizeInBytes = node->sizeInBytes();
  • trunk/Source/WTF/wtf/ParallelJobsGeneric.cpp

    r245876 r261393  
    3535namespace WTF {
    3636
    37 Vector< RefPtr<ParallelEnvironment::ThreadPrivate> >* ParallelEnvironment::s_threadPool = 0;
     37Vector< RefPtr<ParallelEnvironment::ThreadPrivate> >* ParallelEnvironment::s_threadPool = nullptr;
    3838
    3939ParallelEnvironment::ParallelEnvironment(ThreadFunction threadFunction, size_t sizeOfParameter, int requestedJobNumber) :
  • trunk/Source/WTF/wtf/RandomDevice.cpp

    r237721 r261393  
    109109    // If it is safe, we can acquire context per RandomDevice.
    110110    HCRYPTPROV hCryptProv = 0;
    111     if (!CryptAcquireContext(&hCryptProv, 0, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
     111    if (!CryptAcquireContext(&hCryptProv, nullptr, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
    112112        CRASH();
    113113    if (!CryptGenRandom(hCryptProv, length, buffer))
  • trunk/Source/WTF/wtf/RawPointer.h

    r237099 r261393  
    3131public:
    3232    RawPointer()
    33         : m_value(0)
     33        : m_value(nullptr)
    3434    {
    3535    }
  • trunk/Source/WTF/wtf/RedBlackTree.h

    r259582 r261393  
    9696        void reset()
    9797        {
    98             m_left = 0;
    99             m_right = 0;
     98            m_left = nullptr;
     99            m_right = nullptr;
    100100            m_parentAndRed = 1; // initialize to red
    101101        }
     
    154154
    155155    RedBlackTree()
    156         : m_root(0)
     156        : m_root(nullptr)
    157157    {
    158158    }
     
    297297    NodeType* findLeastGreaterThanOrEqual(const KeyType& key) const
    298298    {
    299         NodeType* best = 0;
     299        NodeType* best = nullptr;
    300300        for (NodeType* current = m_root; current;) {
    301301            if (current->key() == key)
     
    313313    NodeType* findGreatestLessThanOrEqual(const KeyType& key) const
    314314    {
    315         NodeType* best = 0;
     315        NodeType* best = nullptr;
    316316        for (NodeType* current = m_root; current;) {
    317317            if (current->key() == key)
     
    350350    {
    351351        if (!m_root)
    352             return 0;
     352            return nullptr;
    353353        return treeMinimum(m_root);
    354354    }
     
    414414        ASSERT(z->color() == Red);
    415415       
    416         NodeType* y = 0;
     416        NodeType* y = nullptr;
    417417        NodeType* x = m_root;
    418418        while (x) {
  • trunk/Source/WTF/wtf/SHA1.cpp

    r237099 r261393  
    205205CString SHA1::hexDigest(const Digest& digest)
    206206{
    207     char* start = 0;
     207    char* start = nullptr;
    208208    CString result = CString::newUninitialized(40, start);
    209209    char* buffer = start;
  • trunk/Source/WTF/wtf/SchedulePair.h

    r250005 r261393  
    5959    {
    6060        if (mode)
    61             m_mode = adoptCF(CFStringCreateCopy(0, mode));
     61            m_mode = adoptCF(CFStringCreateCopy(nullptr, mode));
    6262    }
    6363
  • trunk/Source/WTF/wtf/StackTrace.cpp

    r257298 r261393  
    5050    *size = backtrace(stack, *size);
    5151#elif OS(WINDOWS)
    52     *size = RtlCaptureStackBackTrace(0, *size, stack, 0);
     52    *size = RtlCaptureStackBackTrace(0, *size, stack, nullptr);
    5353#else
    5454    UNUSED_PARAM(stack);
     
    132132        mangledName = symbols[i];
    133133#elif OS(WINDOWS)
    134         if (DbgHelper::SymFromAddress(hProc, reinterpret_cast<DWORD64>(stack[i]), 0, symbolInfo))
     134        if (DbgHelper::SymFromAddress(hProc, reinterpret_cast<DWORD64>(stack[i]), nullptr, symbolInfo))
    135135            mangledName = symbolInfo->Name;
    136136#endif
  • trunk/Source/WTF/wtf/StringExtras.h

    r225618 r261393  
    4040            return const_cast<char*>(start);
    4141    }
    42     return 0;
     42    return nullptr;
    4343}
    4444
  • trunk/Source/WTF/wtf/Variant.h

    r248546 r261393  
    13101310template <typename _Type> struct __is_swappable {
    13111311    static constexpr bool value =
    1312         sizeof(__swap_test_detail::__test<_Type>(0)) != 1;
     1312        sizeof(__swap_test_detail::__test<_Type>(nullptr)) != 1;
    13131313};
    13141314
  • trunk/Source/WTF/wtf/Vector.h

    r261041 r261393  
    329329       
    330330        if (m_buffer == bufferToDeallocate) {
    331             m_buffer = 0;
     331            m_buffer = nullptr;
    332332            m_capacity = 0;
    333333        }
     
    344344    {
    345345        T* buffer = m_buffer;
    346         m_buffer = 0;
     346        m_buffer = nullptr;
    347347        m_capacity = 0;
    348348        return adoptMallocPtr<T, Malloc>(buffer);
     
    351351protected:
    352352    VectorBufferBase()
    353         : m_buffer(0)
     353        : m_buffer(nullptr)
    354354        , m_capacity(0)
    355355        , m_size(0)
  • trunk/Source/WTF/wtf/cf/CFURLExtras.cpp

    r260707 r261393  
    3838    // could either be a malformed string or bytes in a different encoding, like Shift-JIS, so we fall back
    3939    // onto using ISO Latin-1 in those cases.
    40     RetainPtr<CFURLRef> result = adoptCF(CFURLCreateAbsoluteURLWithBytes(0, reinterpret_cast<const UInt8*>(data), size, kCFStringEncodingUTF8, baseURL, true));
     40    RetainPtr<CFURLRef> result = adoptCF(CFURLCreateAbsoluteURLWithBytes(nullptr, reinterpret_cast<const UInt8*>(data), size, kCFStringEncodingUTF8, baseURL, true));
    4141    if (!result)
    42         result = adoptCF(CFURLCreateAbsoluteURLWithBytes(0, reinterpret_cast<const UInt8*>(data), size, kCFStringEncodingISOLatin1, baseURL, true));
     42        result = adoptCF(CFURLCreateAbsoluteURLWithBytes(nullptr, reinterpret_cast<const UInt8*>(data), size, kCFStringEncodingISOLatin1, baseURL, true));
    4343    return result;
    4444}
     
    4646void getURLBytes(CFURLRef url, URLCharBuffer& result)
    4747{
    48     CFIndex bytesLength = CFURLGetBytes(url, 0, 0);
     48    CFIndex bytesLength = CFURLGetBytes(url, nullptr, 0);
    4949    result.resize(bytesLength);
    5050    CFIndex finalLength = CFURLGetBytes(url, reinterpret_cast<UInt8*>(result.data()), bytesLength);
     
    5454void getURLBytes(CFURLRef url, CString& result)
    5555{
    56     CFIndex bytesLength = CFURLGetBytes(url, 0, 0);
     56    CFIndex bytesLength = CFURLGetBytes(url, nullptr, 0);
    5757    char* bytes;
    5858    result = CString::newUninitialized(bytesLength, bytes);
  • trunk/Source/WTF/wtf/cf/CFURLExtras.h

    r239556 r261393  
    3535typedef Vector<char, 512> URLCharBuffer;
    3636
    37 WTF_EXPORT_PRIVATE RetainPtr<CFURLRef> createCFURLFromBuffer(const char*, size_t, CFURLRef baseURL = 0);
     37WTF_EXPORT_PRIVATE RetainPtr<CFURLRef> createCFURLFromBuffer(const char*, size_t, CFURLRef baseURL = nullptr);
    3838WTF_EXPORT_PRIVATE void getURLBytes(CFURLRef, URLCharBuffer&);
    3939WTF_EXPORT_PRIVATE void getURLBytes(CFURLRef, CString&);
  • trunk/Source/WTF/wtf/cf/FileSystemCF.cpp

    r240437 r261393  
    6969    pathStyle = kCFURLPOSIXPathStyle;
    7070#endif
    71     return adoptCF(CFURLCreateWithFileSystemPath(0, path.createCFString().get(), pathStyle, FALSE));
     71    return adoptCF(CFURLCreateWithFileSystemPath(nullptr, path.createCFString().get(), pathStyle, FALSE));
    7272}
    7373
  • trunk/Source/WTF/wtf/dtoa/double-conversion.cc

    r250636 r261393  
    6363  Double double_inspect(value);
    6464  if (double_inspect.IsInfinite()) {
    65     if (infinity_symbol_ == NULL) return false;
     65    if (infinity_symbol_ == nullptr) return false;
    6666    if (value < 0) {
    6767      result_builder->AddCharacter('-');
     
    7171  }
    7272  if (double_inspect.IsNan()) {
    73     if (nan_symbol_ == NULL) return false;
     73    if (nan_symbol_ == nullptr) return false;
    7474    result_builder->AddString(nan_symbol_);
    7575    return true;
  • trunk/Source/WTF/wtf/dtoa/utils.h

    r250636 r261393  
    193193class BufferReference {
    194194 public:
    195   BufferReference() : start_(NULL), length_(0) {}
     195  BufferReference() : start_(nullptr), length_(0) {}
    196196  BufferReference(T* data, int len) : start_(data), length_(len) {
    197197    ASSERT(len == 0 || (len > 0 && data != NULL));
  • trunk/Source/WTF/wtf/text/CString.cpp

    r256910 r261393  
    7777    copyBufferIfNeeded();
    7878    if (!m_buffer)
    79         return 0;
     79        return nullptr;
    8080    return m_buffer->mutableData();
    8181}
  • trunk/Source/WTF/wtf/text/CString.h

    r256910 r261393  
    6868    const char* data() const
    6969    {
    70         return m_buffer ? m_buffer->data() : 0;
     70        return m_buffer ? m_buffer->data() : nullptr;
    7171    }
    7272    WTF_EXPORT_PRIVATE char* mutableData();
  • trunk/Source/WTF/wtf/text/StringBuffer.h

    r253987 r261393  
    8080    {
    8181        CharType* data = m_data;
    82         m_data = 0;
     82        m_data = nullptr;
    8383        return adoptMallocPtr<CharType, StringBufferMalloc>(data);
    8484    }
  • trunk/Source/WTF/wtf/text/StringImpl.cpp

    r260383 r261393  
    183183{
    184184    if (!length) {
    185         data = 0;
     185        data = nullptr;
    186186        return *empty();
    187187    }
     
    219219
    220220    if (!length) {
    221         data = 0;
     221        data = nullptr;
    222222        return Ref<StringImpl>(*empty());
    223223    }
  • trunk/Source/WTF/wtf/text/StringImpl.h

    r260383 r261393  
    391391    WTF_EXPORT_PRIVATE UChar32 characterStartingAt(unsigned);
    392392
    393     int toIntStrict(bool* ok = 0, int base = 10);
    394     unsigned toUIntStrict(bool* ok = 0, int base = 10);
    395     int64_t toInt64Strict(bool* ok = 0, int base = 10);
    396     uint64_t toUInt64Strict(bool* ok = 0, int base = 10);
    397     intptr_t toIntPtrStrict(bool* ok = 0, int base = 10);
    398 
    399     WTF_EXPORT_PRIVATE int toInt(bool* ok = 0); // ignores trailing garbage
    400     unsigned toUInt(bool* ok = 0); // ignores trailing garbage
    401     int64_t toInt64(bool* ok = 0); // ignores trailing garbage
    402     uint64_t toUInt64(bool* ok = 0); // ignores trailing garbage
    403     intptr_t toIntPtr(bool* ok = 0); // ignores trailing garbage
     393    int toIntStrict(bool* ok = nullptr, int base = 10);
     394    unsigned toUIntStrict(bool* ok = nullptr, int base = 10);
     395    int64_t toInt64Strict(bool* ok = nullptr, int base = 10);
     396    uint64_t toUInt64Strict(bool* ok = nullptr, int base = 10);
     397    intptr_t toIntPtrStrict(bool* ok = nullptr, int base = 10);
     398
     399    WTF_EXPORT_PRIVATE int toInt(bool* ok = nullptr); // ignores trailing garbage
     400    unsigned toUInt(bool* ok = nullptr); // ignores trailing garbage
     401    int64_t toInt64(bool* ok = nullptr); // ignores trailing garbage
     402    uint64_t toUInt64(bool* ok = nullptr); // ignores trailing garbage
     403    intptr_t toIntPtr(bool* ok = nullptr); // ignores trailing garbage
    404404
    405405    // FIXME: Like the strict functions above, these give false for "ok" when there is trailing garbage.
    406406    // Like the non-strict functions above, these return the value when there is trailing garbage.
    407407    // It would be better if these were more consistent with the above functions instead.
    408     double toDouble(bool* ok = 0);
    409     float toFloat(bool* ok = 0);
     408    double toDouble(bool* ok = nullptr);
     409    float toFloat(bool* ok = nullptr);
    410410
    411411    WTF_EXPORT_PRIVATE Ref<StringImpl> convertToASCIILowercase();
  • trunk/Source/WTF/wtf/text/TextBreakIterator.cpp

    r246490 r261393  
    6565{
    6666    UErrorCode openStatus = U_ZERO_ERROR;
    67     UBreakIterator* iterator = ubrk_open(type, locale, 0, 0, &openStatus);
     67    UBreakIterator* iterator = ubrk_open(type, locale, nullptr, 0, &openStatus);
    6868    ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus);
    6969    return iterator;
     
    135135        if (U_FAILURE(openStatus)) {
    136136            LOG_ERROR("openUTF16ContextAwareUTextProvider failed with status %d", openStatus);
    137             return 0;
     137            return nullptr;
    138138        }
    139139
     
    192192    bool localeIsEmpty = locale.isEmpty();
    193193    UErrorCode openStatus = U_ZERO_ERROR;
    194     UBreakIterator* ubrkIter = ubrk_open(UBRK_LINE, localeIsEmpty ? currentTextBreakLocaleID() : locale.string().utf8().data(), 0, 0, &openStatus);
     194    UBreakIterator* ubrkIter = ubrk_open(UBRK_LINE, localeIsEmpty ? currentTextBreakLocaleID() : locale.string().utf8().data(), nullptr, 0, &openStatus);
    195195    // locale comes from a web page and it can be invalid, leading ICU
    196196    // to fail, in which case we fall back to the default locale.
    197197    if (!localeIsEmpty && U_FAILURE(openStatus)) {
    198198        openStatus = U_ZERO_ERROR;
    199         ubrkIter = ubrk_open(UBRK_LINE, currentTextBreakLocaleID(), 0, 0, &openStatus);
     199        ubrkIter = ubrk_open(UBRK_LINE, currentTextBreakLocaleID(), nullptr, 0, &openStatus);
    200200    }
    201201
  • trunk/Source/WTF/wtf/text/TextBreakIterator.h

    r256420 r261393  
    286286    {
    287287        ASSERT(priorContextLength <= priorContextCapacity);
    288         const UChar* priorContext = priorContextLength ? &m_priorContext[priorContextCapacity - priorContextLength] : 0;
     288        const UChar* priorContext = priorContextLength ? &m_priorContext[priorContextCapacity - priorContextLength] : nullptr;
    289289        if (!m_iterator) {
    290290            m_iterator = acquireLineBreakIterator(m_stringView, m_locale, priorContext, priorContextLength, m_mode);
  • trunk/Source/WTF/wtf/text/WTFString.cpp

    r260707 r261393  
    10741074{
    10751075    // FIXME: This will return ok even when the string fits into a double but not a float.
    1076     return static_cast<float>(toDoubleType<LChar, AllowTrailingJunk>(data, length, 0, parsedLength));
     1076    return static_cast<float>(toDoubleType<LChar, AllowTrailingJunk>(data, length, nullptr, parsedLength));
    10771077}
    10781078
     
    10801080{
    10811081    // FIXME: This will return ok even when the string fits into a double but not a float.
    1082     return static_cast<float>(toDoubleType<UChar, AllowTrailingJunk>(data, length, 0, parsedLength));
     1082    return static_cast<float>(toDoubleType<UChar, AllowTrailingJunk>(data, length, nullptr, parsedLength));
    10831083}
    10841084
  • trunk/Source/WTF/wtf/text/cf/StringImplCF.cpp

    r253987 r261393  
    5858    static void* allocate(CFIndex size, CFOptionFlags, void*)
    5959    {
    60         StringImpl* underlyingString = 0;
     60        StringImpl* underlyingString = nullptr;
    6161        if (isMainThread()) {
    6262            underlyingString = currentString;
    6363            if (underlyingString) {
    64                 currentString = 0;
     64                currentString = nullptr;
    6565                underlyingString->ref(); // Balanced by call to deref in deallocate below.
    6666            }
     
    114114    static CFAllocatorRef create()
    115115    {
    116         CFAllocatorContext context = { 0, 0, retain, release, copyDescription, allocate, reallocate, deallocate, preferredSize };
    117         return CFAllocatorCreate(0, &context);
     116        CFAllocatorContext context = { 0, nullptr, retain, release, copyDescription, allocate, reallocate, deallocate, preferredSize };
     117        return CFAllocatorCreate(nullptr, &context);
    118118    }
    119119
     
    130130    if (!m_length || !isMainThread()) {
    131131        if (is8Bit())
    132             return adoptCF(CFStringCreateWithBytes(0, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false));
    133         return adoptCF(CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(characters16()), m_length));
     132            return adoptCF(CFStringCreateWithBytes(nullptr, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false));
     133        return adoptCF(CFStringCreateWithCharacters(nullptr, reinterpret_cast<const UniChar*>(characters16()), m_length));
    134134    }
    135135    CFAllocatorRef allocator = StringWrapperCFAllocator::allocator();
     
    145145        string = CFStringCreateWithCharactersNoCopy(allocator, reinterpret_cast<const UniChar*>(characters16()), m_length, kCFAllocatorNull);
    146146    // CoreFoundation might not have to allocate anything, we clear currentString in case we did not execute allocate().
    147     StringWrapperCFAllocator::currentString = 0;
     147    StringWrapperCFAllocator::currentString = nullptr;
    148148
    149149    return adoptCF(string);
  • trunk/Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp

    r250380 r261393  
    6666
    6767    if (U_FAILURE(*status))
    68         return 0;
     68        return nullptr;
    6969
    7070    UText* result = utext_setup(destination, sizeof(UChar) * UTextWithBufferInlineCapacity, status);
     
    378378{
    379379    if (U_FAILURE(*status))
    380         return 0;
     380        return nullptr;
    381381    if (!string || length > static_cast<unsigned>(std::numeric_limits<int32_t>::max())) {
    382382        *status = U_ILLEGAL_ARGUMENT_ERROR;
    383         return 0;
     383        return nullptr;
    384384    }
    385385    UText* text = utext_setup(&utWithBuffer->text, sizeof(utWithBuffer->buffer), status);
    386386    if (U_FAILURE(*status)) {
    387387        ASSERT(!text);
    388         return 0;
     388        return nullptr;
    389389    }
    390390
  • trunk/Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp

    r237099 r261393  
    167167{
    168168    if (U_FAILURE(*status))
    169         return 0;
     169        return nullptr;
    170170    if (!string || length > static_cast<unsigned>(std::numeric_limits<int32_t>::max())) {
    171171        *status = U_ILLEGAL_ARGUMENT_ERROR;
    172         return 0;
     172        return nullptr;
    173173    }
    174174    text = utext_setup(text, 0, status);
    175175    if (U_FAILURE(*status)) {
    176176        ASSERT(!text);
    177         return 0;
     177        return nullptr;
    178178    }
    179179
  • trunk/Source/WTF/wtf/win/FileSystemWin.cpp

    r257518 r261393  
    295295{
    296296    String fullPath = path;
    297     if (SHCreateDirectoryEx(0, fullPath.wideCharacters().data(), 0) != ERROR_SUCCESS) {
     297    if (SHCreateDirectoryEx(nullptr, fullPath.wideCharacters().data(), nullptr) != ERROR_SUCCESS) {
    298298        DWORD error = GetLastError();
    299299        if (error != ERROR_FILE_EXISTS && error != ERROR_ALREADY_EXISTS) {
     
    349349{
    350350    Vector<UChar> buffer(MAX_PATH);
    351     if (FAILED(SHGetFolderPathW(0, pathIdentifier | CSIDL_FLAG_CREATE, 0, 0, wcharFrom(buffer.data()))))
     351    if (FAILED(SHGetFolderPathW(nullptr, pathIdentifier | CSIDL_FLAG_CREATE, nullptr, 0, wcharFrom(buffer.data()))))
    352352        return String();
    353353
     
    411411    String proposedPath = generateTemporaryPath([&handle](const String& proposedPath) {
    412412        // use CREATE_NEW to avoid overwriting an existing file with the same name
    413         handle = ::CreateFileW(proposedPath.wideCharacters().data(), GENERIC_READ | GENERIC_WRITE, 0, 0, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0);
     413        handle = ::CreateFileW(proposedPath.wideCharacters().data(), GENERIC_READ | GENERIC_WRITE, 0, nullptr, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, nullptr);
    414414
    415415        return isHandleValid(handle) || GetLastError() == ERROR_ALREADY_EXISTS;
     
    447447
    448448    String destination = path;
    449     return CreateFile(destination.wideCharacters().data(), desiredAccess, shareMode, 0, creationDisposition, FILE_ATTRIBUTE_NORMAL, 0);
     449    return CreateFile(destination.wideCharacters().data(), desiredAccess, shareMode, nullptr, creationDisposition, FILE_ATTRIBUTE_NORMAL, nullptr);
    450450}
    451451
     
    492492
    493493    DWORD bytesWritten;
    494     bool success = WriteFile(handle, data, length, &bytesWritten, 0);
     494    bool success = WriteFile(handle, data, length, &bytesWritten, nullptr);
    495495
    496496    if (!success)
     
    505505
    506506    DWORD bytesRead;
    507     bool success = ::ReadFile(handle, data, length, &bytesRead, 0);
     507    bool success = ::ReadFile(handle, data, length, &bytesRead, nullptr);
    508508
    509509    if (!success)
     
    603603        FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT,
    604604        false,
    605         0,
     605        nullptr,
    606606        L""
    607607    };
  • trunk/Source/WTF/wtf/win/LanguageWin.cpp

    r257688 r261393  
    4141{
    4242    LANGID langID = GetUserDefaultUILanguage();
    43     int localeChars = GetLocaleInfo(langID, localeType, 0, 0);
     43    int localeChars = GetLocaleInfo(langID, localeType, nullptr, 0);
    4444    if (!localeChars)
    4545        return fallback;
  • trunk/Source/WTF/wtf/win/MainThreadWin.cpp

    r251164 r261393  
    6363    RegisterClassW(&wcex);
    6464
    65     threadingWindowHandle = CreateWindowW(kThreadingWindowClassName, 0, 0,
    66         CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, 0, 0);
     65    threadingWindowHandle = CreateWindowW(kThreadingWindowClassName, nullptr, 0,
     66        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, nullptr, nullptr, nullptr);
    6767    threadingFiredMessage = RegisterWindowMessageW(L"com.apple.WebKit.MainThreadFired");
    6868
  • trunk/Source/WTF/wtf/win/OSAllocatorWin.cpp

    r240636 r261393  
    4141void* OSAllocator::reserveUncommitted(size_t bytes, Usage, bool writable, bool executable, bool)
    4242{
    43     void* result = VirtualAlloc(0, bytes, MEM_RESERVE, protection(writable, executable));
     43    void* result = VirtualAlloc(nullptr, bytes, MEM_RESERVE, protection(writable, executable));
    4444    if (!result)
    4545        CRASH();
     
    4949void* OSAllocator::reserveAndCommit(size_t bytes, Usage, bool writable, bool executable, bool)
    5050{
    51     void* result = VirtualAlloc(0, bytes, MEM_RESERVE | MEM_COMMIT, protection(writable, executable));
     51    void* result = VirtualAlloc(nullptr, bytes, MEM_RESERVE | MEM_COMMIT, protection(writable, executable));
    5252    if (!result)
    5353        CRASH();
  • trunk/Source/WTF/wtf/win/RunLoopWin.cpp

    r260477 r261393  
    6767{
    6868    MSG message;
    69     while (BOOL result = ::GetMessage(&message, 0, 0, 0)) {
     69    while (BOOL result = ::GetMessage(&message, nullptr, 0, 0)) {
    7070        if (result == -1)
    7171            break;
     
    7878{
    7979    MSG message;
    80     while (::PeekMessage(&message, 0, 0, 0, PM_REMOVE)) {
     80    while (::PeekMessage(&message, nullptr, 0, 0, PM_REMOVE)) {
    8181        ::TranslateMessage(&message);
    8282        ::DispatchMessage(&message);
     
    110110RunLoop::RunLoop()
    111111{
    112     m_runLoopMessageWindow = ::CreateWindow(kRunLoopMessageWindowClassName, 0, 0,
    113         CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, 0, this);
     112    m_runLoopMessageWindow = ::CreateWindow(kRunLoopMessageWindowClassName, nullptr, 0,
     113        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, nullptr, nullptr, this);
    114114    ASSERT(::IsWindow(m_runLoopMessageWindow));
    115115}
     
    132132{
    133133    MSG message;
    134     if (!::GetMessage(&message, 0, 0, 0))
     134    if (!::GetMessage(&message, nullptr, 0, 0))
    135135        return CycleResult::Stop;
    136136
     
    188188    m_interval = nextFireInterval;
    189189    m_nextFireDate = MonotonicTime::now() + m_interval;
    190     ::SetTimer(m_runLoop->m_runLoopMessageWindow, bitwise_cast<uintptr_t>(this), nextFireInterval.millisecondsAs<UINT>(), 0);
     190    ::SetTimer(m_runLoop->m_runLoopMessageWindow, bitwise_cast<uintptr_t>(this), nextFireInterval.millisecondsAs<UINT>(), nullptr);
    191191}
    192192
  • trunk/Source/WTF/wtf/win/ThreadingWin.cpp

    r260911 r261393  
    158158    unsigned threadIdentifier = 0;
    159159    unsigned initFlag = stackSize ? STACK_SIZE_PARAM_IS_A_RESERVATION : 0;
    160     HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, stackSize.valueOr(0), wtfThreadEntryPoint, data, initFlag, &threadIdentifier));
     160    HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(nullptr, stackSize.valueOr(0), wtfThreadEntryPoint, data, initFlag, &threadIdentifier));
    161161    if (!threadHandle) {
    162162        LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", wtfThreadEntryPoint, data, errno);
Note: See TracChangeset for help on using the changeset viewer.