OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var g_browserBridge; | 5 var g_browserBridge; |
6 var g_mainView; | 6 var g_mainView; |
7 | 7 |
8 // TODO(eroman): The handling of "max" across snapshots is not correct. | 8 // TODO(eroman): The handling of "max" across snapshots is not correct. |
9 // For starters the browser needs to be aware to generate new maximums. | 9 // For starters the browser needs to be aware to generate new maximums. |
10 // Secondly, we need to take into account the "max" of intermediary snapshots, | 10 // Secondly, we need to take into account the "max" of intermediary snapshots, |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
871 // Define a translation function for each property. Normally we copy over | 871 // Define a translation function for each property. Normally we copy over |
872 // properties as-is, but if we have been asked to "merge similar threads" we | 872 // properties as-is, but if we have been asked to "merge similar threads" we |
873 // we will remap the thread names that end in a numeric suffix. | 873 // we will remap the thread names that end in a numeric suffix. |
874 var propertyGetterFunc; | 874 var propertyGetterFunc; |
875 | 875 |
876 if (mergeSimilarThreads) { | 876 if (mergeSimilarThreads) { |
877 propertyGetterFunc = function(row, key) { | 877 propertyGetterFunc = function(row, key) { |
878 var value = row[key]; | 878 var value = row[key]; |
879 // If the property is a thread name, try to remap it. | 879 // If the property is a thread name, try to remap it. |
880 if (key == KEY_BIRTH_THREAD || key == KEY_DEATH_THREAD) { | 880 if (key == KEY_BIRTH_THREAD || key == KEY_DEATH_THREAD) { |
881 var m = /^(.*)(\d+)$/.exec(value); | 881 var m = /^(.*)[^\d](\d+)$/.exec(value); |
jar (doing other things)
2011/11/23 16:45:48
I think you discard the last character of the non-
| |
882 if (m) | 882 if (m) |
883 value = m[1] + '*'; | 883 value = m[1] + '*'; |
884 } | 884 } |
885 return value; | 885 return value; |
886 } | 886 } |
887 } else { | 887 } else { |
888 propertyGetterFunc = function(row, key) { return row[key]; }; | 888 propertyGetterFunc = function(row, key) { return row[key]; }; |
889 } | 889 } |
890 | 890 |
891 // Determine which sets of properties a row needs to match on to be | 891 // Determine which sets of properties a row needs to match on to be |
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2053 groupKey.push(entry); | 2053 groupKey.push(entry); |
2054 } | 2054 } |
2055 | 2055 |
2056 return JSON.stringify(groupKey); | 2056 return JSON.stringify(groupKey); |
2057 }; | 2057 }; |
2058 }, | 2058 }, |
2059 }; | 2059 }; |
2060 | 2060 |
2061 return MainView; | 2061 return MainView; |
2062 })(); | 2062 })(); |
OLD | NEW |