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

Unified Diff: Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 1323293004: DevTools: Show function deopt reason in timeline details (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TimelineUIUtils.js
diff --git a/Source/devtools/front_end/timeline/TimelineUIUtils.js b/Source/devtools/front_end/timeline/TimelineUIUtils.js
index 0eb3d79a33023d6da92f23f093415675f3e7281e..4cb991baf2b3ae1725de221316b93ff1d10bda02 100644
--- a/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -620,6 +620,14 @@ WebInspector.TimelineUIUtils._buildTraceEventDetailsSynchronously = function(eve
var delta = event.args["usedHeapSizeBefore"] - event.args["usedHeapSizeAfter"];
contentHelper.appendTextRow(WebInspector.UIString("Collected"), Number.bytesToString(delta));
break;
+ case recordTypes.JSFrame:
+ var detailsNode = WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent(event, model.target(), linkifier);
+ if (detailsNode)
+ contentHelper.appendElementRow(WebInspector.UIString("Function"), detailsNode);
+ var deoptReason = eventData["deoptReason"];
+ if (deoptReason && deoptReason != "no reason")
+ contentHelper.appendTextRow(WebInspector.UIString("Warning"), WebInspector.UIString("Not optimized: %s", deoptReason), true);
+ break;
case recordTypes.TimerFire:
case recordTypes.TimerInstall:
case recordTypes.TimerRemove:
@@ -1860,10 +1868,13 @@ WebInspector.TimelineDetailsContentHelper.prototype = {
/**
* @param {string} title
* @param {string|number|boolean} value
+ * @param {boolean=} isWarning
*/
- appendTextRow: function(title, value)
+ appendTextRow: function(title, value, isWarning)
{
var rowElement = this.element.createChild("div", "timeline-details-view-row");
+ if (isWarning)
+ rowElement.classList.add("timeline-details-warning");
rowElement.createChild("div", "timeline-details-view-row-title").textContent = title;
rowElement.createChild("div", "timeline-details-view-row-value" + (this._monospaceValues ? " monospace" : "")).textContent = value;
},
@@ -1932,5 +1943,4 @@ WebInspector.TimelineDetailsContentHelper.prototype = {
stackTraceElement.appendChild(callFrameElem);
}
-
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698