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

Unified Diff: components/nacl/browser/nacl_process_host.cc

Issue 286143010: Remove knowledge of nacl from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « components/nacl/browser/nacl_process_host.h ('k') | content/browser/browser_child_process_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/nacl_process_host.cc
diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc
index c48a71d49f6b9434078bae9dd653b9fae2aa4c2c..7451fe610e269597601947c34a5e31295694188f 100644
--- a/components/nacl/browser/nacl_process_host.cc
+++ b/components/nacl/browser/nacl_process_host.cc
@@ -312,6 +312,7 @@ NaClProcessHost::~NaClProcessHost() {
} else {
LOG(ERROR) << message;
}
+ NaClBrowser::GetInstance()->OnProcessEnd(process_->GetData().id);
}
if (internal_->socket_for_renderer != NACL_INVALID_HANDLE) {
@@ -351,6 +352,7 @@ void NaClProcessHost::OnProcessCrashed(int exit_status) {
// static
void NaClProcessHost::EarlyStartup() {
NaClBrowser::GetInstance()->EarlyStartup();
+ // Inform NaClBrowser that we exist and will have a debug port at some point.
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
// Open the IRT file early to make sure that it isn't replaced out from
// under us by autoupdate.
@@ -491,6 +493,7 @@ void NaClProcessHost::OnChannelConnected(int32 peer_pid) {
void NaClProcessHost::OnProcessLaunchedByBroker(base::ProcessHandle handle) {
process_launched_by_broker_ = true;
process_->SetHandle(handle);
+ SetDebugStubPort(nacl::kGdbDebugStubPortUnknown);
if (!StartWithLaunchedProcess())
delete this;
}
@@ -766,13 +769,9 @@ void NaClProcessHost::SendMessageToRenderer(
}
}
-void NaClProcessHost::SetDebugStubPort(uint16_t port) {
+void NaClProcessHost::SetDebugStubPort(int port) {
NaClBrowser* nacl_browser = NaClBrowser::GetInstance();
- if (nacl_browser->HasGdbDebugStubPortListener()) {
- nacl_browser->FireGdbDebugStubPortOpened(port);
- }
- // Set debug stub port on the process object.
- process_->SetNaClDebugStubPort(port);
+ nacl_browser->SetProcessGdbDebugStubPort(process_->GetData().id, port);
}
#if defined(OS_POSIX)
« no previous file with comments | « components/nacl/browser/nacl_process_host.h ('k') | content/browser/browser_child_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698