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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js

Issue 2153893002: [DevTools] Fix line and column in CallstackSidebarPane for async frames (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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-url-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 /** 122 /**
123 * @param {!Array.<!RuntimeAgent.CallFrame>} callFrames 123 * @param {!Array.<!RuntimeAgent.CallFrame>} callFrames
124 * @param {!WebInspector.UIList.Item} asyncCallFrameItem 124 * @param {!WebInspector.UIList.Item} asyncCallFrameItem
125 * @return {!Array<!WebInspector.CallStackSidebarPane.CallFrame>} 125 * @return {!Array<!WebInspector.CallStackSidebarPane.CallFrame>}
126 */ 126 */
127 _callFramesFromRuntime: function(callFrames, asyncCallFrameItem) 127 _callFramesFromRuntime: function(callFrames, asyncCallFrameItem)
128 { 128 {
129 var callFrameItems = []; 129 var callFrameItems = [];
130 for (var i = 0, n = callFrames.length; i < n; ++i) { 130 for (var i = 0, n = callFrames.length; i < n; ++i) {
131 var callFrame = callFrames[i]; 131 var callFrame = callFrames[i];
132 // TODO(591496): conform location in debugger and runtime 132 var location = new WebInspector.DebuggerModel.Location(this._debugge rModel, callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber);
133 var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0 ;
134 var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 : 0;
135 var location = new WebInspector.DebuggerModel.Location(this._debugge rModel, callFrame.scriptId, lineNumber, columnNumber);
136 var callFrameItem = new WebInspector.CallStackSidebarPane.CallFrame( callFrame.functionName, location, this._linkifier, null, this._locationPool, asy ncCallFrameItem); 133 var callFrameItem = new WebInspector.CallStackSidebarPane.CallFrame( callFrame.functionName, location, this._linkifier, null, this._locationPool, asy ncCallFrameItem);
137 callFrameItem.element.addEventListener("click", this._asyncCallFrame Clicked.bind(this, callFrameItem), false); 134 callFrameItem.element.addEventListener("click", this._asyncCallFrame Clicked.bind(this, callFrameItem), false);
138 callFrameItems.push(callFrameItem); 135 callFrameItems.push(callFrameItem);
139 } 136 }
140 return callFrameItems; 137 return callFrameItems;
141 }, 138 },
142 139
143 /** 140 /**
144 * @param {!Array.<!WebInspector.CallStackSidebarPane.CallFrame>} callFrames 141 * @param {!Array.<!WebInspector.CallStackSidebarPane.CallFrame>} callFrames
145 * @param {!WebInspector.UIList.Item=} asyncCallFrameItem 142 * @param {!WebInspector.UIList.Item=} asyncCallFrameItem
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 var uiLocation = liveLocation.uiLocation(); 464 var uiLocation = liveLocation.uiLocation();
468 if (!uiLocation) 465 if (!uiLocation)
469 return; 466 return;
470 var text = uiLocation.linkText(); 467 var text = uiLocation.linkText();
471 this.setSubtitle(text.trimMiddle(30)); 468 this.setSubtitle(text.trimMiddle(30));
472 this.subtitleElement.title = text; 469 this.subtitleElement.title = text;
473 }, 470 },
474 471
475 __proto__: WebInspector.UIList.Item.prototype 472 __proto__: WebInspector.UIList.Item.prototype
476 } 473 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-url-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698