summaryrefslogtreecommitdiffstats
path: root/security/sandbox/chromium-shim/patches/with_update/ifdef_out_SequenceChecker_code.patch
blob: 62216e9af73e6a0a4288c135c742d9c4949fb2d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# HG changeset patch
# User Bob Owen <bobowencode@gmail.com>
# Date 1509027043 -3600
#      Thu Oct 26 15:10:43 2017 +0100
# Node ID cbe274e5b95c1c207597a0fbb4a80905d6d4dacc
# Parent  bbbba04e693f3819bcb6dd70ea27d3cab194e4cb
This removes sequence checking on RefCountedBase in DEBUG builds. r=aklotz

We don't currently make use of it and it brings in many dependencies.

diff --git a/security/sandbox/chromium/base/memory/ref_counted.cc b/security/sandbox/chromium/base/memory/ref_counted.cc
--- a/security/sandbox/chromium/base/memory/ref_counted.cc
+++ b/security/sandbox/chromium/base/memory/ref_counted.cc
@@ -53,18 +53,22 @@ bool RefCountedThreadSafeBase::Release()
 }
 void RefCountedThreadSafeBase::AddRefWithCheck() const {
   AddRefWithCheckImpl();
 }
 #endif
 
 #if DCHECK_IS_ON()
 bool RefCountedBase::CalledOnValidSequence() const {
+#if defined(MOZ_SANDBOX)
+  return true;
+#else
   return sequence_checker_.CalledOnValidSequence() ||
          g_cross_thread_ref_count_access_allow_count.load() != 0;
+#endif
 }
 #endif
 
 }  // namespace subtle
 
 #if DCHECK_IS_ON()
 ScopedAllowCrossThreadRefCountAccess::ScopedAllowCrossThreadRefCountAccess() {
   ++g_cross_thread_ref_count_access_allow_count;