| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * @fileOverview Debugging module used for load time measurements. | 19 * @fileOverview Debugging module used for load time measurements. |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 let nestingCounter = 0; | 22 let nestingCounter = 0; |
| 23 let firstTimeStamp = null; | 23 let firstTimeStamp = null; |
| 24 let lastTimeStamp = null; | 24 let lastTimeStamp = null; |
| 25 | 25 |
| 26 let asyncActions = {__proto__: null}; | 26 let asyncActions = Object.create(null); |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * Time logging module, used to measure startup time of Adblock Plus (developmen
t builds only). | 29 * Time logging module, used to measure startup time of Adblock Plus (developmen
t builds only). |
| 30 * @class | 30 * @class |
| 31 */ | 31 */ |
| 32 let TimeLine = exports.TimeLine = { | 32 let TimeLine = exports.TimeLine = { |
| 33 /** | 33 /** |
| 34 * Logs an event to console together with the time it took to get there. | 34 * Logs an event to console together with the time it took to get there. |
| 35 */ | 35 */ |
| 36 log: function(/**String*/ message, /**Boolean*/ _forceDisplay) | 36 log: function(/**String*/ message, /**Boolean*/ _forceDisplay) |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 let message = "Async action " + asyncAction + " done"; | 146 let message = "Async action " + asyncAction + " done"; |
| 147 let padding = []; | 147 let padding = []; |
| 148 for (let i = message.toString().length; i < 80; i++) | 148 for (let i = message.toString().length; i < 80; i++) |
| 149 padding.push(" "); | 149 padding.push(" "); |
| 150 dump("[" + now + "] ABP timeline: " + message + padding.join("") + "\t ("
+ action.total + "/" + diff + ")\n"); | 150 dump("[" + now + "] ABP timeline: " + message + padding.join("") + "\t ("
+ action.total + "/" + diff + ")\n"); |
| 151 } | 151 } |
| 152 else | 152 else |
| 153 dump("ABP timeline: Warning: Async action " + asyncAction + " is unknown\n
"); | 153 dump("ABP timeline: Warning: Async action " + asyncAction + " is unknown\n
"); |
| 154 } | 154 } |
| 155 }; | 155 }; |
| OLD | NEW |