Revert of Assert sequence validity on non-thread-safe RefCount manipulations (2) (patchset #35 id:700001 of https://codereview.chromium.org/2666423002/ )

Reason for revert:
Speculative revert to see if this CL is the cause of the RenderWidgetHostViewChildFrameTest.ForwardsBeginFrameAcks failures on https://uberchromegw.corp.google.com/i/chromium.win/builders/Win%207%20Tests%20x64%20%281%29/builds/22400

Original issue's description:
> Assert sequence validity on non-thread-safe RefCount manipulations
>
> This CL adds DCHECKs to non-thread-safe base::RefCount to trace racy
> ref count manipulations. A ref counted object is considered to be bound
> to a sequence if the count is more than one. After this CL, ref count
> manipulations to a sequenced-bound one cause DCHECK failure.
>
> This CL also adds ScopedAllowCrossThreadRefCountAccess to opt out,
> and applies the opt-out as needed.
>
> BUG=688072
> CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
>
> Review-Url: https://codereview.chromium.org/2666423002
> Cr-Commit-Position: refs/heads/master@{#460773}
> Committed: https://chromium.googlesource.com/chromium/src/+/f9a212dec0fec22e21d7f66ad1aa9414ed1dc068

TBR=gab@chromium.org,raymes@chromium.org,zmo@chromium.org,yzshen@chromium.org,danakj@chromium.org,tzik@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=688072

Review-Url: https://codereview.chromium.org/2783393002
Cr-Original-Commit-Position: refs/heads/master@{#460859}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4d5b2df34c2023956579d96e89aaaacf04e510d1
diff --git a/shared_impl/proxy_lock.h b/shared_impl/proxy_lock.h
index 66a5688..366504e 100644
--- a/shared_impl/proxy_lock.h
+++ b/shared_impl/proxy_lock.h
@@ -191,12 +191,6 @@
     // is destroyed on the same thread (see the comments in the destructor).
     DCHECK(ptr->thread_checker_.CalledOnValidThread());
     ProxyAutoLock lock;
-
-    // Relax the cross-thread access restriction to non-thread-safe RefCount.
-    // |lock| above protects the access to Resource instances.
-    base::ScopedAllowCrossThreadRefCountAccess
-        allow_cross_thread_ref_count_access;
-
     {
       // Use a scope and local Callback to ensure that the callback is cleared
       // before the lock is released, even in the unlikely event that Run()
@@ -228,12 +222,6 @@
       //   call the ResourceTracker and also the Resource's destructor, which
       //   both require the ProxyLock.
       ProxyAutoLock lock;
-
-      // Relax the cross-thread access restriction to non-thread-safe RefCount.
-      // |lock| above protects the access to Resource instances.
-      base::ScopedAllowCrossThreadRefCountAccess
-          allow_cross_thread_ref_count_access;
-
       callback_.reset();
     }
   }
@@ -258,10 +246,6 @@
                               P1 p1) {
     DCHECK(ptr->thread_checker_.CalledOnValidThread());
     ProxyAutoLock lock;
-    // Relax the cross-thread access restriction to non-thread-safe RefCount.
-    // |lock| above protects the access to Resource instances.
-    base::ScopedAllowCrossThreadRefCountAccess
-        allow_cross_thread_ref_count_access;
     {
       std::unique_ptr<CallbackType> temp_callback(std::move(ptr->callback_));
       temp_callback->Run(p1);
@@ -271,10 +255,6 @@
     DCHECK(thread_checker_.CalledOnValidThread());
     if (callback_) {
       ProxyAutoLock lock;
-      // Relax the cross-thread access restriction to non-thread-safe RefCount.
-      // |lock| above protects the access to Resource instances.
-      base::ScopedAllowCrossThreadRefCountAccess
-          allow_cross_thread_ref_count_access;
       callback_.reset();
     }
   }
@@ -298,10 +278,6 @@
                               P2 p2) {
     DCHECK(ptr->thread_checker_.CalledOnValidThread());
     ProxyAutoLock lock;
-    // Relax the cross-thread access restriction to non-thread-safe RefCount.
-    // |lock| above protects the access to Resource instances.
-    base::ScopedAllowCrossThreadRefCountAccess
-        allow_cross_thread_ref_count_access;
     {
       std::unique_ptr<CallbackType> temp_callback(std::move(ptr->callback_));
       temp_callback->Run(p1, p2);
@@ -311,10 +287,6 @@
     DCHECK(thread_checker_.CalledOnValidThread());
     if (callback_) {
       ProxyAutoLock lock;
-      // Relax the cross-thread access restriction to non-thread-safe RefCount.
-      // |lock| above protects the access to Resource instances.
-      base::ScopedAllowCrossThreadRefCountAccess
-          allow_cross_thread_ref_count_access;
       callback_.reset();
     }
   }
@@ -339,10 +311,6 @@
                               P3 p3) {
     DCHECK(ptr->thread_checker_.CalledOnValidThread());
     ProxyAutoLock lock;
-    // Relax the cross-thread access restriction to non-thread-safe RefCount.
-    // |lock| above protects the access to Resource instances.
-    base::ScopedAllowCrossThreadRefCountAccess
-        allow_cross_thread_ref_count_access;
     {
       std::unique_ptr<CallbackType> temp_callback(std::move(ptr->callback_));
       temp_callback->Run(p1, p2, p3);
@@ -352,10 +320,6 @@
     DCHECK(thread_checker_.CalledOnValidThread());
     if (callback_) {
       ProxyAutoLock lock;
-      // Relax the cross-thread access restriction to non-thread-safe RefCount.
-      // |lock| above protects the access to Resource instances.
-      base::ScopedAllowCrossThreadRefCountAccess
-          allow_cross_thread_ref_count_access;
       callback_.reset();
     }
   }
diff --git a/shared_impl/tracked_callback.cc b/shared_impl/tracked_callback.cc
index 8c38c62..8a689dd 100644
--- a/shared_impl/tracked_callback.cc
+++ b/shared_impl/tracked_callback.cc
@@ -228,11 +228,6 @@
   if (resource_id_)
     tracker_->Remove(thiz);
   tracker_ = NULL;
-
-  // Relax the cross-thread access restriction to non-thread-safe RefCount.
-  // |lock_| protects the access to Resource instances.
-  base::ScopedAllowCrossThreadRefCountAccess
-      allow_cross_thread_ref_count_access;
   target_loop_ = NULL;
 }