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

Unified Diff: content/child/child_io_surface_manager_mac.cc

Issue 1248713002: ozone: ClientPixmapManager passes VGEM fd from browser to renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add IOSurfaceManager to ThreadRestrictions friend list. Created 5 years, 4 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
Index: content/child/child_io_surface_manager_mac.cc
diff --git a/content/child/child_io_surface_manager_mac.cc b/content/child/child_io_surface_manager_mac.cc
index 65df72b04aa034053d80a292362a0c234f574884..44eef959a4575d4f1ecf2ee4a76b1bf8ffabc7fb 100644
--- a/content/child/child_io_surface_manager_mac.cc
+++ b/content/child/child_io_surface_manager_mac.cc
@@ -5,6 +5,7 @@
#include "content/child/child_io_surface_manager_mac.h"
#include "base/mac/mach_logging.h"
+#include "base/threading/thread_restrictions.h"
#include "content/common/mac/io_surface_manager_messages.h"
namespace content {
@@ -96,8 +97,11 @@ IOSurfaceRef ChildIOSurfaceManager::AcquireIOSurface(
// A valid token is required to acquire an IOSurface. This will wait for a
// valid token if one has not yet been set.
- set_token_event_.Wait();
-#if !defined(NDEBUG)
+ {
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
+ set_token_event_.Wait();
+ }
+#if DCHECK_IS_ON()
DCHECK(!(set_token_thread_id_ == base::PlatformThread::CurrentRef()));
#endif
DCHECK(!token_.IsZero());

Powered by Google App Engine
This is Rietveld 408576698