From fbbf19334582b078027408ac7531326d3138ffb6 Mon Sep 17 00:00:00 2001 From: Jason Booth Date: Sun, 18 Jul 2010 21:39:15 -0400 Subject: [PATCH] Fixed duplicated entries and unnecessary file locking in ProfViewer (bug 4510, r=dvander) --- tools/profiler/csharp/Form1.cs | 10 +++------- tools/profiler/csharp/ProfReport.cs | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tools/profiler/csharp/Form1.cs b/tools/profiler/csharp/Form1.cs index d6af181e..a1be9e7a 100644 --- a/tools/profiler/csharp/Form1.cs +++ b/tools/profiler/csharp/Form1.cs @@ -47,13 +47,9 @@ namespace profviewer ProfileItem atom; ListViewItem item; - if (m_Report == null) - { - report_list.Items.Clear(); - report_info_duration.Text = ""; - report_info_starttime.Text = ""; - return; - } + report_list.Items.Clear(); + report_info_duration.Text = ""; + report_info_starttime.Text = ""; report_info_duration.Text = m_Report.Duration.ToString() + " seconds"; report_info_starttime.Text = m_Report.StartTime.ToString(); diff --git a/tools/profiler/csharp/ProfReport.cs b/tools/profiler/csharp/ProfReport.cs index 580e2094..bc42d547 100644 --- a/tools/profiler/csharp/ProfReport.cs +++ b/tools/profiler/csharp/ProfReport.cs @@ -133,6 +133,7 @@ namespace profviewer } } } + xml.Close(); } public double Duration