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

Unified Diff: components/tracing/child_trace_message_filter.cc

Issue 1447643002: Bulk Reports: Fix an infinite loop in ChildTraceMessageFilter::OnSetUMACallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix IOS. Created 5 years, 1 month 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: components/tracing/child_trace_message_filter.cc
diff --git a/components/tracing/child_trace_message_filter.cc b/components/tracing/child_trace_message_filter.cc
index 5d087347b176d84c8923b64e0aadf6ec57999523..0694a174887b725c2240ec076636a73ae80f75f6 100644
--- a/components/tracing/child_trace_message_filter.cc
+++ b/components/tracing/child_trace_message_filter.cc
@@ -34,6 +34,10 @@ void ChildTraceMessageFilter::OnFilterAdded(IPC::Sender* sender) {
this);
}
+void ChildTraceMessageFilter::SetSenderForTesting(IPC::Sender* sender) {
+ sender_ = sender;
+}
+
void ChildTraceMessageFilter::OnFilterRemoved() {
ChildMemoryDumpManagerDelegateImpl::GetInstance()->SetChildTraceMessageFilter(
nullptr);
@@ -306,10 +310,6 @@ void ChildTraceMessageFilter::OnSetUMACallback(
base::HistogramBase::Sample max;
base::HistogramBase::Count count;
sample_iterator->Get(&min, &max, &count);
- if (count == 0) {
- sample_iterator->Next();
- continue;
- }
if (min >= histogram_lower_value && max <= histogram_upper_value) {
ipc_task_runner_->PostTask(
@@ -322,7 +322,10 @@ void ChildTraceMessageFilter::OnSetUMACallback(
base::Bind(
&ChildTraceMessageFilter::SendAbortBackgroundTracingMessage,
this));
+ break;
}
+
+ sample_iterator->Next();
}
}
« no previous file with comments | « components/tracing/child_trace_message_filter.h ('k') | components/tracing/child_trace_message_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698