tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

04_ifdef_out_SequenceChecker_code.patch (1110B)


      1 # HG changeset patch
      2 # User Bob Owen <bobowencode@gmail.com>
      3 # Date 1509027043 -3600
      4 #      Thu Oct 26 15:10:43 2017 +0100
      5 # Node ID cbe274e5b95c1c207597a0fbb4a80905d6d4dacc
      6 # Parent  bbbba04e693f3819bcb6dd70ea27d3cab194e4cb
      7 This removes sequence checking on RefCountedBase in DEBUG builds. r=aklotz
      8 
      9 We don't currently make use of it and it brings in many dependencies.
     10 
     11 diff --git a/base/memory/ref_counted.cc b/base/memory/ref_counted.cc
     12 --- a/base/memory/ref_counted.cc
     13 +++ b/base/memory/ref_counted.cc
     14 @@ -53,18 +53,22 @@ bool RefCountedThreadSafeBase::Release()
     15 }
     16 void RefCountedThreadSafeBase::AddRefWithCheck() const {
     17   AddRefWithCheckImpl();
     18 }
     19 #endif
     20 
     21 #if DCHECK_IS_ON()
     22 bool RefCountedBase::CalledOnValidSequence() const {
     23 +#if defined(MOZ_SANDBOX)
     24 +  return true;
     25 +#else
     26   return sequence_checker_.CalledOnValidSequence() ||
     27          g_cross_thread_ref_count_access_allow_count.load() != 0;
     28 +#endif
     29 }
     30 #endif
     31 
     32 }  // namespace subtle
     33 
     34 #if DCHECK_IS_ON()
     35 ScopedAllowCrossThreadRefCountAccess::ScopedAllowCrossThreadRefCountAccess() {
     36   ++g_cross_thread_ref_count_access_allow_count;