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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js

Issue 2145483002: [DevTools] make Runtime.CallFrame 0-based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a 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/components/Linkifier.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
index fc3b6b1c934d7356f00658395b1d0bd600e15a11..07b04cf3d6076e3393e72f8b792236c9f13ab566 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
@@ -204,7 +204,19 @@ WebInspector.Linkifier.prototype = {
*/
linkifyConsoleCallFrame: function(target, callFrame, classes)
{
- return this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, WebInspector.DebuggerModel.fromOneBased(callFrame.lineNumber), WebInspector.DebuggerModel.fromOneBased(callFrame.columnNumber), classes);
+ return this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, callFrame.lineNumber, callFrame.columnNumber, classes);
+ },
+
+ /**
+ * @param {?WebInspector.Target} target
+ * @param {!RuntimeAgent.CallFrame} callFrame
+ * @param {string=} classes
+ * @return {!Element}
+ */
+ linkifyConsoleCallFrameForTimeline: function(target, callFrame, classes)
+ {
+ // TODO(kozyatinskiy): remove this when Profilers will migrate to 0-based lineNumber and columnNumber.
+ return this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, callFrame.lineNumber - 1, callFrame.columnNumber - 1, classes);
},
/**
@@ -218,7 +230,7 @@ WebInspector.Linkifier.prototype = {
console.assert(stackTrace.callFrames && stackTrace.callFrames.length);
var topFrame = stackTrace.callFrames[0];
- var fallbackAnchor = WebInspector.linkifyResourceAsNode(topFrame.url, WebInspector.DebuggerModel.fromOneBased(topFrame.lineNumber), WebInspector.DebuggerModel.fromOneBased(topFrame.columnNumber), classes);
+ var fallbackAnchor = WebInspector.linkifyResourceAsNode(topFrame.url, topFrame.lineNumber, topFrame.columnNumber, classes);
if (target.isDetached())
return fallbackAnchor;

Powered by Google App Engine
This is Rietveld 408576698