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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 2746333002: DevTools: move recurring flag into AsyncTask, control cancelation from embedder only. (Closed)
Patch Set: using _END now Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 e._blackboxRoot = true; 330 e._blackboxRoot = true;
331 } 331 }
332 if (title) { 332 if (title) {
333 this._appendHeader(title, style, forceExpanded); 333 this._appendHeader(title, style, forceExpanded);
334 title = ''; 334 title = '';
335 } 335 }
336 336
337 var level = this._currentLevel + openEvents.length; 337 var level = this._currentLevel + openEvents.length;
338 if (flowEventsEnabled) 338 if (flowEventsEnabled)
339 this._appendFlowEvent(e, level); 339 this._appendFlowEvent(e, level);
340 this._appendEvent(e, level); 340 if (e.phase !== SDK.TracingModel.Phase.FlowEnd)
341 this._appendEvent(e, level);
341 if (!isExtension && TimelineModel.TimelineModel.isMarkerEvent(e)) 342 if (!isExtension && TimelineModel.TimelineModel.isMarkerEvent(e))
342 this._timelineData.entryTotalTimes[this._entryData.length] = undefined; 343 this._timelineData.entryTotalTimes[this._entryData.length] = undefined;
343 344
344 maxStackDepth = Math.max(maxStackDepth, openEvents.length + 1); 345 maxStackDepth = Math.max(maxStackDepth, openEvents.length + 1);
345 if (e.endTime) 346 if (e.endTime)
346 openEvents.push(e); 347 openEvents.push(e);
347 } 348 }
348 this._entryTypeByLevel.length = this._currentLevel + maxStackDepth; 349 this._entryTypeByLevel.length = this._currentLevel + maxStackDepth;
349 this._entryTypeByLevel.fill(entryType, this._currentLevel); 350 this._entryTypeByLevel.fill(entryType, this._currentLevel);
350 this._currentLevel += maxStackDepth; 351 this._currentLevel += maxStackDepth;
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 762
762 switch (event.phase) { 763 switch (event.phase) {
763 case SDK.TracingModel.Phase.FlowBegin: 764 case SDK.TracingModel.Phase.FlowBegin:
764 this._flowEventIndexById.set(event.id, pushStartFlow(event)); 765 this._flowEventIndexById.set(event.id, pushStartFlow(event));
765 break; 766 break;
766 case SDK.TracingModel.Phase.FlowStep: 767 case SDK.TracingModel.Phase.FlowStep:
767 pushEndFlow(event, this._flowEventIndexById.get(event.id)); 768 pushEndFlow(event, this._flowEventIndexById.get(event.id));
768 this._flowEventIndexById.set(event.id, pushStartFlow(event)); 769 this._flowEventIndexById.set(event.id, pushStartFlow(event));
769 break; 770 break;
770 case SDK.TracingModel.Phase.FlowEnd: 771 case SDK.TracingModel.Phase.FlowEnd:
771 pushEndFlow(event, this._flowEventIndexById.get(event.id));
772 this._flowEventIndexById.delete(event.id); 772 this._flowEventIndexById.delete(event.id);
773 break; 773 break;
774 } 774 }
775 } 775 }
776 776
777 /** 777 /**
778 * @param {!TimelineModel.TimelineFrame} frame 778 * @param {!TimelineModel.TimelineFrame} frame
779 */ 779 */
780 _appendFrame(frame) { 780 _appendFrame(frame) {
781 var index = this._entryData.length; 781 var index = this._entryData.length;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 * @return {boolean} 868 * @return {boolean}
869 */ 869 */
870 _isVisible(event) { 870 _isVisible(event) {
871 return this._filters.every(function(filter) { 871 return this._filters.every(function(filter) {
872 return filter.accept(event); 872 return filter.accept(event);
873 }); 873 });
874 } 874 }
875 }; 875 };
876 876
877 Timeline.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.001; 877 Timeline.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.001;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698