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

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

Issue 2084993002: Mojo: add support for disallowing sync calls for a process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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: mojo/public/cpp/bindings/lib/router.cc
diff --git a/mojo/public/cpp/bindings/lib/router.cc b/mojo/public/cpp/bindings/lib/router.cc
index 2fcc7d74131987ef5f4f1fa39725df8bde5b3e47..2db2eed3e3d4a42847cd5cb881cc237730c42d79 100644
--- a/mojo/public/cpp/bindings/lib/router.cc
+++ b/mojo/public/cpp/bindings/lib/router.cc
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
+#include "mojo/public/cpp/bindings/sync_call_restrictions.h"
namespace mojo {
namespace internal {
@@ -165,6 +166,8 @@ bool Router::AcceptWithResponder(Message* message, MessageReceiver* responder) {
return true;
}
+ SyncCallRestrictions::AssertSyncCallAllowed();
+
bool response_received = false;
std::unique_ptr<MessageReceiver> sync_responder(responder);
sync_responses_.insert(std::make_pair(
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_endpoint_client.cc ('k') | mojo/public/cpp/bindings/lib/sync_call_restrictions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698