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

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

Issue 306123009: Remove TimelinePresentationModel.Record.childHasWarning (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 | « Source/devtools/front_end/timeline/TimelineFlameChart.js ('k') | no next file » | 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 * @return {!Object.<string, number>} 656 * @return {!Object.<string, number>}
657 */ 657 */
658 aggregatedStats: function() { }, 658 aggregatedStats: function() { },
659 659
660 /** 660 /**
661 * @return {?Array.<string>} 661 * @return {?Array.<string>}
662 */ 662 */
663 warnings: function() { }, 663 warnings: function() { },
664 664
665 /** 665 /**
666 * @return {boolean}
667 */
668 childHasWarnings: function() { },
669
670 /**
671 * @param {!RegExp} regExp 666 * @param {!RegExp} regExp
672 * @return {boolean} 667 * @return {boolean}
673 */ 668 */
674 testContentMatching: function(regExp) { } 669 testContentMatching: function(regExp) { }
675 } 670 }
676 671
677 /** 672 /**
678 * @constructor 673 * @constructor
679 * @implements {WebInspector.TimelineModel.Record} 674 * @implements {WebInspector.TimelineModel.Record}
680 * @param {!WebInspector.TimelineModel} model 675 * @param {!WebInspector.TimelineModel} model
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 aggregatedStats: function() 918 aggregatedStats: function()
924 { 919 {
925 return this._aggregatedStats; 920 return this._aggregatedStats;
926 }, 921 },
927 922
928 /** 923 /**
929 * @param {string} message 924 * @param {string} message
930 */ 925 */
931 addWarning: function(message) 926 addWarning: function(message)
932 { 927 {
933 if (this._warnings) 928 if (!this._warnings)
934 this._warnings.push(message); 929 this._warnings = [];
935 else { 930 this._warnings.push(message);
936 this._warnings = [message];
937 for (var parent = this.parent; parent && !parent._childHasWarnings; parent = parent.parent)
938 parent._childHasWarnings = true;
939 }
940 }, 931 },
941 932
942 /** 933 /**
943 * @return {?Array.<string>} 934 * @return {?Array.<string>}
944 */ 935 */
945 warnings: function() 936 warnings: function()
946 { 937 {
947 return this._warnings; 938 return this._warnings;
948 }, 939 },
949 940
950 /** 941 /**
951 * @return {boolean}
952 */
953 childHasWarnings: function()
954 {
955 return !!this._childHasWarnings;
956 },
957
958 /**
959 * @param {!RegExp} regExp 942 * @param {!RegExp} regExp
960 * @return {boolean} 943 * @return {boolean}
961 */ 944 */
962 testContentMatching: function(regExp) 945 testContentMatching: function(regExp)
963 { 946 {
964 var tokens = [this.title()]; 947 var tokens = [this.title()];
965 for (var key in this._record.data) 948 for (var key in this._record.data)
966 tokens.push(this._record.data[key]) 949 tokens.push(this._record.data[key])
967 return regExp.test(tokens.join("|")); 950 return regExp.test(tokens.join("|"));
968 } 951 }
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 function recordTimestampComparator(a, b) 1192 function recordTimestampComparator(a, b)
1210 { 1193 {
1211 // Never return 0, as the merge function will squash identical entri es. 1194 // Never return 0, as the merge function will squash identical entri es.
1212 return a.startTime() < b.startTime() ? -1 : 1; 1195 return a.startTime() < b.startTime() ? -1 : 1;
1213 } 1196 }
1214 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator); 1197 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator);
1215 this._backgroundRecordsBuffer = []; 1198 this._backgroundRecordsBuffer = [];
1216 return result; 1199 return result;
1217 } 1200 }
1218 } 1201 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFlameChart.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698