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

Unified Diff: chrome/browser/task_manager/sampling/task_group.cc

Issue 2646623004: Query NaCl processes' GDB debug port on the correct thread. (Closed)
Patch Set: Remove optimization Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/sampling/task_group.cc
diff --git a/chrome/browser/task_manager/sampling/task_group.cc b/chrome/browser/task_manager/sampling/task_group.cc
index d7fab26f8d64944db4aa3da4f1b4d03a783e06c9..e31f0d1478840b3df3c3121067cea50bc938d5d2 100644
--- a/chrome/browser/task_manager/sampling/task_group.cc
+++ b/chrome/browser/task_manager/sampling/task_group.cc
@@ -90,7 +90,7 @@ TaskGroup::TaskGroup(
user_peak_handles_(-1),
#endif // defined(OS_WIN)
#if !defined(DISABLE_NACL)
- nacl_debug_stub_port_(-1),
+ nacl_debug_stub_port_(nacl::kGdbDebugStubPortUnknown),
afakhry 2017/01/23 17:41:55 While we are here, can you please revise the expec
Wez 2017/01/23 19:21:01 Hmmm, GetNaClPortText() doesn't need the -2 case,
#endif // !defined(DISABLE_NACL)
idle_wakeups_per_second_(-1),
#if defined(OS_LINUX)
@@ -258,12 +258,15 @@ void TaskGroup::RefreshWindowsHandles() {
}
#if !defined(DISABLE_NACL)
+static int GetNaClDebugStubPort(int process_id) {
afakhry 2017/01/23 17:41:55 Can you please add a DCHECK_CURRENTLY_ON(content::
Wez 2017/01/23 19:21:02 I'd prefer to express that via the name, since thi
+ return nacl::NaClBrowser::GetInstance()->GetProcessGdbDebugStubPort(
+ process_id);
+}
+
void TaskGroup::RefreshNaClDebugStubPort(int child_process_unique_id) {
- nacl::NaClBrowser* nacl_browser = nacl::NaClBrowser::GetInstance();
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
- base::Bind(&nacl::NaClBrowser::GetProcessGdbDebugStubPort,
- base::Unretained(nacl_browser), child_process_unique_id),
+ base::Bind(&GetNaClDebugStubPort, child_process_unique_id),
base::Bind(&TaskGroup::OnRefreshNaClDebugStubPortDone,
weak_ptr_factory_.GetWeakPtr()));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698