| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1754 nodesToGo.push(node); | 1754 nodesToGo.push(node); |
| 1755 if (!node.url || !node.positionTicks) | 1755 if (!node.url || !node.positionTicks) |
| 1756 continue; | 1756 continue; |
| 1757 var fileInfo = this._files.get(node.url); | 1757 var fileInfo = this._files.get(node.url); |
| 1758 if (!fileInfo) { | 1758 if (!fileInfo) { |
| 1759 fileInfo = new Map(); | 1759 fileInfo = new Map(); |
| 1760 this._files.set(node.url, fileInfo); | 1760 this._files.set(node.url, fileInfo); |
| 1761 } | 1761 } |
| 1762 for (var j = 0; j < node.positionTicks.length; ++j) { | 1762 for (var j = 0; j < node.positionTicks.length; ++j) { |
| 1763 var lineInfo = node.positionTicks[j]; | 1763 var lineInfo = node.positionTicks[j]; |
| 1764 var line = lineInfo.line - 1; | 1764 var line = lineInfo.line; |
| 1765 var time = lineInfo.ticks * sampleDuration; | 1765 var time = lineInfo.ticks * sampleDuration; |
| 1766 fileInfo.set(line, (fileInfo.get(line) || 0) + time); | 1766 fileInfo.set(line, (fileInfo.get(line) || 0) + time); |
| 1767 } | 1767 } |
| 1768 } | 1768 } |
| 1769 } | 1769 } |
| 1770 }, | 1770 }, |
| 1771 | 1771 |
| 1772 /** | 1772 /** |
| 1773 * @return {!Map<string, !Map<number, number>>} | 1773 * @return {!Map<string, !Map<number, number>>} |
| 1774 */ | 1774 */ |
| 1775 files: function() | 1775 files: function() |
| 1776 { | 1776 { |
| 1777 return this._files; | 1777 return this._files; |
| 1778 } | 1778 } |
| 1779 } | 1779 } |
| OLD | NEW |