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

Unified Diff: mojo/public/cpp/bindings/lib/sync_handle_registry.cc

Issue 2363503002: Mojo C++ bindings: Add a SINGLE_INTERFACE_WITH_SYNC_REQUESTS mode for MultiplexRouter. (Closed)
Patch Set: .. Created 4 years, 3 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 | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/sync_handle_registry.cc
diff --git a/mojo/public/cpp/bindings/lib/sync_handle_registry.cc b/mojo/public/cpp/bindings/lib/sync_handle_registry.cc
index ef236953404b92873a3812f701a51171a822e9da..cc8313717577821d89b56f0d1c5c78feebcafc26 100644
--- a/mojo/public/cpp/bindings/lib/sync_handle_registry.cc
+++ b/mojo/public/cpp/bindings/lib/sync_handle_registry.cc
@@ -107,6 +107,11 @@ SyncHandleRegistry::SyncHandleRegistry() {
SyncHandleRegistry::~SyncHandleRegistry() {
DCHECK(thread_checker_.CalledOnValidThread());
+
+ // If this breaks, it is likely that the global variable is bulit into and
+ // accessed from multiple modules.
+ CHECK_EQ(this, g_current_sync_handle_watcher.Pointer()->Get());
+
g_current_sync_handle_watcher.Pointer()->Set(nullptr);
}
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698