| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 if (processRecords(record.children(), depth + 1)) | 254 if (processRecords(record.children(), depth + 1)) |
| 255 return true; | 255 return true; |
| 256 if (postOrderCallback && postOrderCallback(record, depth)) | 256 if (postOrderCallback && postOrderCallback(record, depth)) |
| 257 return true; | 257 return true; |
| 258 } | 258 } |
| 259 return false; | 259 return false; |
| 260 } | 260 } |
| 261 return processRecords(recordsArray, 0); | 261 return processRecords(recordsArray, 0); |
| 262 } | 262 } |
| 263 | 263 |
| 264 WebInspector.TimelineModel.TransferChunkLengthBytes = 5000000; | |
| 265 | |
| 266 WebInspector.TimelineModel.DevToolsMetadataEvent = { | 264 WebInspector.TimelineModel.DevToolsMetadataEvent = { |
| 267 TracingStartedInBrowser: "TracingStartedInBrowser", | 265 TracingStartedInBrowser: "TracingStartedInBrowser", |
| 268 TracingStartedInPage: "TracingStartedInPage", | 266 TracingStartedInPage: "TracingStartedInPage", |
| 269 TracingSessionIdForWorker: "TracingSessionIdForWorker", | 267 TracingSessionIdForWorker: "TracingSessionIdForWorker", |
| 270 }; | 268 }; |
| 271 | 269 |
| 272 /** | 270 /** |
| 273 * @constructor | 271 * @constructor |
| 274 * @param {string} name | 272 * @param {string} name |
| 275 */ | 273 */ |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 if (callback) | 651 if (callback) |
| 654 callback(error); | 652 callback(error); |
| 655 } | 653 } |
| 656 }, | 654 }, |
| 657 | 655 |
| 658 /** | 656 /** |
| 659 * @param {boolean} fromFile | 657 * @param {boolean} fromFile |
| 660 */ | 658 */ |
| 661 startCollectingTraceEvents: function(fromFile) | 659 startCollectingTraceEvents: function(fromFile) |
| 662 { | 660 { |
| 661 this._loadedFromFile = fromFile; |
| 663 this._tracingModel.reset(); | 662 this._tracingModel.reset(); |
| 664 this.reset(); | 663 this.reset(); |
| 665 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.Recordin
gStarted, { fromFile: fromFile }); | 664 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.Recordin
gStarted, { fromFile: fromFile }); |
| 666 }, | 665 }, |
| 667 | 666 |
| 668 /** | 667 /** |
| 669 * @override | 668 * @override |
| 670 */ | 669 */ |
| 671 tracingStarted: function() | 670 tracingStarted: function() |
| 672 { | 671 { |
| (...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2007 if (!id) | 2006 if (!id) |
| 2008 return; | 2007 return; |
| 2009 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */ | 2008 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */ |
| 2010 var initiatorMap = this._initiatorByType.get(initiatorType); | 2009 var initiatorMap = this._initiatorByType.get(initiatorType); |
| 2011 if (isInitiator) | 2010 if (isInitiator) |
| 2012 initiatorMap.set(id, event); | 2011 initiatorMap.set(id, event); |
| 2013 else | 2012 else |
| 2014 event.initiator = initiatorMap.get(id) || null; | 2013 event.initiator = initiatorMap.get(id) || null; |
| 2015 } | 2014 } |
| 2016 } | 2015 } |
| OLD | NEW |