Skip to content
  • gab's avatar
    Change EXPECT/ASSERT_DCHECK_DEATH macro to not expose the |regex| parameter. · 5e69cff9
    gab authored
    Most users of the macro were ignoring the regex, now it makes sure a DCHECK
    caused the death (message contains "Check failed") without adding burden on
    callers to encode the exact error message.
    
    This catched an error in SchedulerLock which was generating an exception in
    std::unordered_map::at() instead of hitting the DCHECK it was intending to
    hit. Fixed in precursor CL @ https://codereview.chromium.org/2218443002/.
    
    Also caught http://crbug.com/634552, disabled TaskSchedulerTaskTrackerTest.SingletonAllowed's
    death test on OS_LINUX for now because of it.
    
    Also updated thread_restrictions.cc to use NOTREACHED() instead of LOG(FATAL)
    in order for it to generate a DCHECK failure (it's only defined when DCHECK_IS_ON()
    so it makes sense to align it with that).
    
    BUG=553459, 634552
    
    Review-Url: https://codereview.chromium.org/2213933003
    Cr-Commit-Position: refs/heads/master@{#409980}
    5e69cff9