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

Unified Diff: Source/devtools/front_end/sdk/TracingModel.js

Issue 276793002: Revert "Support warning decorations in Timeline flame chart based on trace events" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: upload correct patch thsi time Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/inspector.html ('k') | Source/devtools/front_end/timeline/TimelineFlameChart.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/TracingModel.js
diff --git a/Source/devtools/front_end/timeline/TracingModel.js b/Source/devtools/front_end/sdk/TracingModel.js
similarity index 90%
rename from Source/devtools/front_end/timeline/TracingModel.js
rename to Source/devtools/front_end/sdk/TracingModel.js
index 6f4b794d0b56f871c408cef761fc14119b8f516d..16c48114103a4da315c1eeb9229d0070b01d62cd 100644
--- a/Source/devtools/front_end/timeline/TracingModel.js
+++ b/Source/devtools/front_end/sdk/TracingModel.js
@@ -174,7 +174,6 @@ WebInspector.TracingModel.prototype = {
_tracingComplete: function()
{
- this._bindings = new WebInspector.TracingModel.EventBindings(this);
this._active = false;
if (!this._pendingStopCallback)
return;
@@ -182,14 +181,6 @@ WebInspector.TracingModel.prototype = {
this._pendingStopCallback = null;
},
- /**
- * @return {!WebInspector.TracingModel.EventBindings}
- */
- bindings: function()
- {
- return this._bindings;
- },
-
reset: function()
{
this._processById = {};
@@ -201,7 +192,6 @@ WebInspector.TracingModel.prototype = {
this._inspectedTargetMainThreadEvents = [];
this._inspectedTargetLayerTreeHostId = 0;
this._frameLifecycleEvents = [];
- this._bindings = null;
},
/**
@@ -301,43 +291,6 @@ WebInspector.TracingModel.prototype = {
}
/**
- * @param {!WebInspector.TracingModel} model
- * @constructor
- */
-WebInspector.TracingModel.EventBindings = function(model)
-{
- this._eventToWarning = new Map();
- this._model = model;
- this._calculateWarnings();
-}
-
-WebInspector.TracingModel.EventBindings.prototype = {
- /**
- * @param {!WebInspector.TracingModel.Event} event
- * @return {string|undefined}
- */
- eventWarning: function(event)
- {
- return this._eventToWarning.get(event);
- },
-
- _calculateWarnings: function()
- {
- var events = this._model.inspectedTargetMainThreadEvents();
- var currentScriptEvent = null;
- for (var i = 0, length = events.length; i < length; i++) {
- var event = events[i];
- if (currentScriptEvent && event.startTime > currentScriptEvent.endTime)
- currentScriptEvent = null;
- if (event.name === WebInspector.TimelineModel.RecordType.Layout && currentScriptEvent)
- this._eventToWarning.put(event, WebInspector.UIString("Forced synchronous layout is a possible performance bottleneck."));
- if (!currentScriptEvent && (event.name === WebInspector.TimelineModel.RecordType.EvaluateScript || event.name === WebInspector.TimelineModel.RecordType.FunctionCall))
- currentScriptEvent = event;
- }
- }
-}
-
-/**
* @constructor
* @param {!WebInspector.TracingModel.EventPayload} payload
* @param {number} level
« no previous file with comments | « Source/devtools/front_end/inspector.html ('k') | Source/devtools/front_end/timeline/TimelineFlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698