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

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

Issue 2156523003: [DevTools] Fix links for JSFrame records in timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
index ead369002491d815e16442d76a9088b7579bbca5..c311c4e647d156857184b4d5b680faa01ecdce9a 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -565,7 +565,7 @@ WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
details = WebInspector.linkifyResourceAsNode(event.url);
break;
case recordType.FunctionCall:
- details = linkifyLocation(eventData["scriptId"], eventData["scriptName"], eventData["scriptLine"], 0);
+ details = linkifyLocation(eventData["scriptId"], eventData["scriptName"], eventData["scriptLine"] - 1, 0);
break;
case recordType.JSFrame:
details = createElement("span");
@@ -580,7 +580,7 @@ WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
case recordType.EvaluateScript:
var url = eventData["url"];
if (url)
- details = linkifyLocation("", url, eventData["lineNumber"], 0);
+ details = linkifyLocation("", url, eventData["lineNumber"] - 1, 0);
break;
case recordType.ParseScriptOnBackground:
var url = eventData["url"];
@@ -607,10 +607,7 @@ WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
*/
function linkifyLocation(scriptId, url, lineNumber, columnNumber)
{
- // FIXME(62725): stack trace line/column numbers are one-based.
- if (columnNumber)
- --columnNumber;
- return linkifier.linkifyScriptLocation(target, scriptId, url, lineNumber - 1, columnNumber, "timeline-details");
+ return linkifier.linkifyScriptLocation(target, scriptId, url, lineNumber, columnNumber, "timeline-details");
}
/**
@@ -619,7 +616,7 @@ WebInspector.TimelineUIUtils.buildDetailsNodeForTraceEvent = function(event, tar
function linkifyTopCallFrame()
{
var frame = WebInspector.TimelineUIUtils.topStackFrame(event);
- return frame ? linkifier.linkifyConsoleCallFrameForTimeline(target, frame, "timeline-details") : null;
+ return frame ? linkifier.linkifyConsoleCallFrameForTracing(target, frame, "timeline-details") : null;
alph 2016/07/16 01:33:36 I think this can be a "tracing" frame as well as a
kozy 2016/07/16 04:54:04 I think that all frames from profiler have JSFrame
}
}
@@ -996,7 +993,7 @@ WebInspector.TimelineUIUtils.buildNetworkRequestDetails = function(request, mode
var sendRequest = request.children[0];
var topFrame = WebInspector.TimelineUIUtils.topStackFrame(sendRequest);
if (topFrame) {
- contentHelper.appendElementRow(title, linkifier.linkifyConsoleCallFrameForTimeline(target, topFrame));
+ contentHelper.appendElementRow(title, linkifier.linkifyConsoleCallFrameForTracing(target, topFrame));
} else if (sendRequest.initiator) {
var initiatorURL = WebInspector.TimelineUIUtils.eventURL(sendRequest.initiator);
if (initiatorURL)
@@ -1241,7 +1238,7 @@ WebInspector.TimelineUIUtils.InvalidationsGroupElement.prototype = {
var stack = title.createChild("span", "monospace");
stack.createChild("span").textContent = WebInspector.beautifyFunctionName(topFrame.functionName);
stack.createChild("span").textContent = " @ ";
- stack.createChild("span").appendChild(this._contentHelper.linkifier().linkifyConsoleCallFrameForTimeline(target, topFrame));
+ stack.createChild("span").appendChild(this._contentHelper.linkifier().linkifyConsoleCallFrameForTracing(target, topFrame));
}
return title;

Powered by Google App Engine
This is Rietveld 408576698