From 5307d7201503bd1a4738ea9b2dbc3cb884b78d42 Mon Sep 17 00:00:00 2001 From: "bradnelson@google.com" Date: Sat, 10 May 2014 02:57:27 +0000 Subject: Update the task manager with the debug stub port chosen by nacl. On mac/linux the debug stub port is allocated chrome side and provided to Native Client. On Windows (where socket handles cannot be passed between processes), the debug port must be allocated by the nacl process (which can only happen when the outer sandbox is disable). Propagate the debug port selected by the nacl side to the task manager to make it available to the user and debugging extensions. Depends on this nacl side change: https://codereview.chromium.org/206493005 BUG=328714 TEST=None R=mseaborn@chromium.org,jschuh@chromium.org Review URL: https://codereview.chromium.org/198083006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269499 0039d316-1c4b-4281-b951-d872f2087c98 --- components/nacl/loader/nacl_listener.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'components/nacl/loader') diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc index e7b8f4c..f527191 100644 --- a/components/nacl/loader/nacl_listener.cc +++ b/components/nacl/loader/nacl_listener.cc @@ -109,6 +109,10 @@ int AttachDebugExceptionHandler(const void* info, size_t info_size) { return result; } +void DebugStubPortSelectedHandler(uint16_t port) { + g_listener->Send(new NaClProcessHostMsg_DebugStubPortSelected(port)); +} + #endif // Creates the PPAPI IPC channel between the NaCl IRT and the host @@ -464,6 +468,8 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) { #if defined(OS_WIN) args->broker_duplicate_handle_func = BrokerDuplicateHandle; args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; + args->debug_stub_server_port_selected_handler_func = + DebugStubPortSelectedHandler; #endif #if defined(OS_LINUX) args->prereserved_sandbox_size = prereserved_sandbox_size_; -- cgit v1.1