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

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

Issue 2169153002: DevTools: make all timeline trace events use 0-based line numbers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update expectation 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
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 for (var i = 0, n = callFrames.length; i < n; ++i) { 113 for (var i = 0, n = callFrames.length; i < n; ++i) {
114 var callFrame = callFrames[i]; 114 var callFrame = callFrames[i];
115 var callFrameItem = new WebInspector.CallStackSidebarPane.CallFrame( callFrame.functionName, callFrame.location(), this._linkifier, callFrame, this._ locationPool); 115 var callFrameItem = new WebInspector.CallStackSidebarPane.CallFrame( callFrame.functionName, callFrame.location(), this._linkifier, callFrame, this._ locationPool);
116 callFrameItem.element.addEventListener("click", this._callFrameSelec ted.bind(this, callFrameItem), false); 116 callFrameItem.element.addEventListener("click", this._callFrameSelec ted.bind(this, callFrameItem), false);
117 callFrameItems.push(callFrameItem); 117 callFrameItems.push(callFrameItem);
118 } 118 }
119 return callFrameItems; 119 return callFrameItems;
120 }, 120 },
121 121
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 var location = new WebInspector.DebuggerModel.Location(this._debugge rModel, callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber); 132 var location = new WebInspector.DebuggerModel.Location(this._debugge rModel, callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber);
133 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);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 var uiLocation = liveLocation.uiLocation(); 464 var uiLocation = liveLocation.uiLocation();
465 if (!uiLocation) 465 if (!uiLocation)
466 return; 466 return;
467 var text = uiLocation.linkText(); 467 var text = uiLocation.linkText();
468 this.setSubtitle(text.trimMiddle(30)); 468 this.setSubtitle(text.trimMiddle(30));
469 this.subtitleElement.title = text; 469 this.subtitleElement.title = text;
470 }, 470 },
471 471
472 __proto__: WebInspector.UIList.Item.prototype 472 __proto__: WebInspector.UIList.Item.prototype
473 } 473 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698