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

Unified Diff: mojo/edk/system/node_channel.cc

Issue 1811433002: [mojo-edk] Expose notification source to MojoWatch callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: mojo/edk/system/node_channel.cc
diff --git a/mojo/edk/system/node_channel.cc b/mojo/edk/system/node_channel.cc
index 0e2ef52769603ffe4fbd63debf02e68bf257a3e1..4072ea086a10b1e8e406f4b15f328c8712c52c1e 100644
--- a/mojo/edk/system/node_channel.cc
+++ b/mojo/edk/system/node_channel.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "mojo/edk/system/channel.h"
+#include "mojo/edk/system/request_context.h"
namespace mojo {
namespace edk {
@@ -347,6 +348,8 @@ void NodeChannel::OnChannelMessage(const void* payload,
ScopedPlatformHandleVectorPtr handles) {
DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
+ RequestContext request_context(RequestContext::Source::SYSTEM);
+
#if defined(OS_WIN)
// If we receive handles from a known process, rewrite them to our own
// process. This can occur when a privileged node receives handles directly
@@ -518,6 +521,8 @@ void NodeChannel::OnChannelMessage(const void* payload,
void NodeChannel::OnChannelError() {
DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
+ RequestContext request_context(RequestContext::Source::SYSTEM);
+
ShutDown();
// |OnChannelError()| may cause |this| to be destroyed, but still need access
// to the name name after that destruction. So may a copy of

Powered by Google App Engine
This is Rietveld 408576698