Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: Source/devtools/front_end/timeline/TimelineModel.js

Issue 305133004: Eliminate url() method on TimelineModel.Record (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelineUIUtils.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 /** 560 /**
561 * @interface 561 * @interface
562 */ 562 */
563 WebInspector.TimelineModel.Record = function() 563 WebInspector.TimelineModel.Record = function()
564 { 564 {
565 } 565 }
566 566
567 WebInspector.TimelineModel.Record.prototype = { 567 WebInspector.TimelineModel.Record.prototype = {
568 /** 568 /**
569 * @return {?string}
570 */
571 url: function() { },
572
573 /**
574 * @return {?Array.<!ConsoleAgent.CallFrame>} 569 * @return {?Array.<!ConsoleAgent.CallFrame>}
575 */ 570 */
576 callSiteStackTrace: function() { }, 571 callSiteStackTrace: function() { },
577 572
578 /** 573 /**
579 * @return {?WebInspector.TimelineModel.Record} 574 * @return {?WebInspector.TimelineModel.Record}
580 */ 575 */
581 initiator: function() { }, 576 initiator: function() { },
582 577
583 /** 578 /**
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 case recordTypes.WebSocketSendHandshakeRequest: 755 case recordTypes.WebSocketSendHandshakeRequest:
761 case recordTypes.WebSocketReceiveHandshakeResponse: 756 case recordTypes.WebSocketReceiveHandshakeResponse:
762 case recordTypes.WebSocketDestroy: 757 case recordTypes.WebSocketDestroy:
763 this._initiator = bindings._webSocketCreateRecords[timelineEvent.data["i dentifier"]]; 758 this._initiator = bindings._webSocketCreateRecords[timelineEvent.data["i dentifier"]];
764 break; 759 break;
765 } 760 }
766 } 761 }
767 762
768 WebInspector.TimelineModel.RecordImpl.prototype = { 763 WebInspector.TimelineModel.RecordImpl.prototype = {
769 /** 764 /**
770 * @return {?string}
771 */
772 url: function()
773 {
774 var data = this.data();
775 if (data && data["url"])
776 return data["url"];
777 if (this._initiator)
778 return this._initiator.url();
779 return null;
780 },
781
782 /**
783 * @return {?Array.<!ConsoleAgent.CallFrame>} 765 * @return {?Array.<!ConsoleAgent.CallFrame>}
784 */ 766 */
785 callSiteStackTrace: function() 767 callSiteStackTrace: function()
786 { 768 {
787 return this._initiator ? this._initiator.stackTrace() : null; 769 return this._initiator ? this._initiator.stackTrace() : null;
788 }, 770 },
789 771
790 /** 772 /**
791 * @return {?WebInspector.TimelineModel.Record} 773 * @return {?WebInspector.TimelineModel.Record}
792 */ 774 */
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 function recordTimestampComparator(a, b) 1209 function recordTimestampComparator(a, b)
1228 { 1210 {
1229 // Never return 0, as the merge function will squash identical entri es. 1211 // Never return 0, as the merge function will squash identical entri es.
1230 return a.startTime() < b.startTime() ? -1 : 1; 1212 return a.startTime() < b.startTime() ? -1 : 1;
1231 } 1213 }
1232 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator); 1214 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator);
1233 this._backgroundRecordsBuffer = []; 1215 this._backgroundRecordsBuffer = [];
1234 return result; 1216 return result;
1235 } 1217 }
1236 } 1218 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698