Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: ppapi/shared_impl/proxy_lock.h

Issue 2783393002: Revert of Assert sequence validity on non-thread-safe RefCount manipulations (2) (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager_sync.cc ('k') | ppapi/shared_impl/tracked_callback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/proxy_lock.h
diff --git a/ppapi/shared_impl/proxy_lock.h b/ppapi/shared_impl/proxy_lock.h
index 66a5688f334154c1bf268cb73d6157ab784f0626..366504eeb9a7dde3b95c5edae90c248c919868f6 100644
--- a/ppapi/shared_impl/proxy_lock.h
+++ b/ppapi/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();
}
}
« no previous file with comments | « gpu/command_buffer/service/mailbox_manager_sync.cc ('k') | ppapi/shared_impl/tracked_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698