| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 474 |
| 475 /** | 475 /** |
| 476 * @param {!WebInspector.TracingModel.Event} event | 476 * @param {!WebInspector.TracingModel.Event} event |
| 477 * @return {?WebInspector.Target} | 477 * @return {?WebInspector.Target} |
| 478 */ | 478 */ |
| 479 targetByEvent: function(event) | 479 targetByEvent: function(event) |
| 480 { | 480 { |
| 481 // FIXME: Consider returning null for loaded traces. | 481 // FIXME: Consider returning null for loaded traces. |
| 482 var workerId = this._workerIdByThread.get(event.thread); | 482 var workerId = this._workerIdByThread.get(event.thread); |
| 483 var mainTarget = WebInspector.targetManager.mainTarget(); | 483 var mainTarget = WebInspector.targetManager.mainTarget(); |
| 484 return workerId ? mainTarget.workerManager.targetByWorkerId(workerId) :
mainTarget; | 484 return workerId ? mainTarget.subTargetsManager.targetForId(workerId) : m
ainTarget; |
| 485 }, | 485 }, |
| 486 | 486 |
| 487 /** | 487 /** |
| 488 * @param {!WebInspector.TracingModel} tracingModel | 488 * @param {!WebInspector.TracingModel} tracingModel |
| 489 * @param {boolean=} produceTraceStartedInPage | 489 * @param {boolean=} produceTraceStartedInPage |
| 490 */ | 490 */ |
| 491 setEvents: function(tracingModel, produceTraceStartedInPage) | 491 setEvents: function(tracingModel, produceTraceStartedInPage) |
| 492 { | 492 { |
| 493 this.reset(); | 493 this.reset(); |
| 494 this._resetProcessingState(); | 494 this._resetProcessingState(); |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 if (!id) | 1853 if (!id) |
| 1854 return; | 1854 return; |
| 1855 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */ | 1855 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */ |
| 1856 var initiatorMap = this._initiatorByType.get(initiatorType); | 1856 var initiatorMap = this._initiatorByType.get(initiatorType); |
| 1857 if (isInitiator) | 1857 if (isInitiator) |
| 1858 initiatorMap.set(id, event); | 1858 initiatorMap.set(id, event); |
| 1859 else | 1859 else |
| 1860 event.initiator = initiatorMap.get(id) || null; | 1860 event.initiator = initiatorMap.get(id) || null; |
| 1861 } | 1861 } |
| 1862 }; | 1862 }; |
| OLD | NEW |