| 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 // In case we have no closing Layout event, endData is not available. | 728 // In case we have no closing Layout event, endData is not available. |
| 729 if (event.args['endData']) | 729 if (event.args['endData']) |
| 730 timelineData.backendNodeId = event.args['endData']['rootNode']; | 730 timelineData.backendNodeId = event.args['endData']['rootNode']; |
| 731 this._layoutInvalidate[frameId] = null; | 731 this._layoutInvalidate[frameId] = null; |
| 732 if (this._currentScriptEvent) | 732 if (this._currentScriptEvent) |
| 733 this._currentTaskLayoutAndRecalcEvents.push(event); | 733 this._currentTaskLayoutAndRecalcEvents.push(event); |
| 734 break; | 734 break; |
| 735 | 735 |
| 736 case recordTypes.EventDispatch: | 736 case recordTypes.EventDispatch: |
| 737 if (event.duration > TimelineModel.TimelineModel.Thresholds.RecurringHan
dler) | 737 if (event.duration > TimelineModel.TimelineModel.Thresholds.RecurringHan
dler) |
| 738 timelineData.warning = TimelineModel.TimelineModel.WarningType.LongH
andler; | 738 timelineData.warning = TimelineModel.TimelineModel.WarningType.LongHan
dler; |
| 739 break; | 739 break; |
| 740 | 740 |
| 741 case recordTypes.TimerFire: | 741 case recordTypes.TimerFire: |
| 742 case recordTypes.FireAnimationFrame: | 742 case recordTypes.FireAnimationFrame: |
| 743 if (event.duration > TimelineModel.TimelineModel.Thresholds.RecurringHan
dler) | 743 if (event.duration > TimelineModel.TimelineModel.Thresholds.RecurringHan
dler) |
| 744 timelineData.warning = TimelineModel.TimelineModel.WarningType.LongR
ecurringHandler; | 744 timelineData.warning = TimelineModel.TimelineModel.WarningType.LongRec
urringHandler; |
| 745 break; | 745 break; |
| 746 | 746 |
| 747 case recordTypes.FunctionCall: | 747 case recordTypes.FunctionCall: |
| 748 // Compatibility with old format. | 748 // Compatibility with old format. |
| 749 if (typeof eventData['scriptName'] === 'string') | 749 if (typeof eventData['scriptName'] === 'string') |
| 750 eventData['url'] = eventData['scriptName']; | 750 eventData['url'] = eventData['scriptName']; |
| 751 if (typeof eventData['scriptLine'] === 'number') | 751 if (typeof eventData['scriptLine'] === 'number') |
| 752 eventData['lineNumber'] = eventData['scriptLine']; | 752 eventData['lineNumber'] = eventData['scriptLine']; |
| 753 | 753 |
| 754 // Fallthrough. | 754 // Fallthrough. |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 this.finishTime = eventData['finishTime'] * 1000; | 1506 this.finishTime = eventData['finishTime'] * 1000; |
| 1507 if (!this.responseTime && | 1507 if (!this.responseTime && |
| 1508 (event.name === recordType.ResourceReceiveResponse || event.name === rec
ordType.ResourceReceivedData)) | 1508 (event.name === recordType.ResourceReceiveResponse || event.name === rec
ordType.ResourceReceivedData)) |
| 1509 this.responseTime = event.startTime; | 1509 this.responseTime = event.startTime; |
| 1510 if (!this.url) | 1510 if (!this.url) |
| 1511 this.url = eventData['url']; | 1511 this.url = eventData['url']; |
| 1512 if (!this.requestMethod) | 1512 if (!this.requestMethod) |
| 1513 this.requestMethod = eventData['requestMethod']; | 1513 this.requestMethod = eventData['requestMethod']; |
| 1514 if (!this.timing) | 1514 if (!this.timing) |
| 1515 this.timing = eventData['timing']; | 1515 this.timing = eventData['timing']; |
| 1516 if (eventData['fromServiceWorker']) |
| 1517 this.fromServiceWorker = true; |
| 1516 } | 1518 } |
| 1517 }; | 1519 }; |
| 1518 | 1520 |
| 1519 TimelineModel.TimelineModel.Filter = class { | 1521 TimelineModel.TimelineModel.Filter = class { |
| 1520 /** | 1522 /** |
| 1521 * @param {!SDK.TracingModel.Event} event | 1523 * @param {!SDK.TracingModel.Event} event |
| 1522 * @return {boolean} | 1524 * @return {boolean} |
| 1523 */ | 1525 */ |
| 1524 accept(event) { | 1526 accept(event) { |
| 1525 return true; | 1527 return true; |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 var data = event[TimelineModel.TimelineData._symbol]; | 2029 var data = event[TimelineModel.TimelineData._symbol]; |
| 2028 if (!data) { | 2030 if (!data) { |
| 2029 data = new TimelineModel.TimelineData(); | 2031 data = new TimelineModel.TimelineData(); |
| 2030 event[TimelineModel.TimelineData._symbol] = data; | 2032 event[TimelineModel.TimelineData._symbol] = data; |
| 2031 } | 2033 } |
| 2032 return data; | 2034 return data; |
| 2033 } | 2035 } |
| 2034 }; | 2036 }; |
| 2035 | 2037 |
| 2036 TimelineModel.TimelineData._symbol = Symbol('timelineData'); | 2038 TimelineModel.TimelineData._symbol = Symbol('timelineData'); |
| OLD | NEW |