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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js

Issue 2560043005: DevTools: Remove unused variables. Disallow unused variables with eslint (Closed)
Patch Set: A new unused variable was born Created 4 years 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Adjust column if needed. 209 // Adjust column if needed.
210 var minColumnNumber = 0; 210 var minColumnNumber = 0;
211 var scripts = this._scriptsBySourceURL.get(url) || []; 211 var scripts = this._scriptsBySourceURL.get(url) || [];
212 for (var i = 0, l = scripts.length; i < l; ++i) { 212 for (var i = 0, l = scripts.length; i < l; ++i) {
213 var script = scripts[i]; 213 var script = scripts[i];
214 if (lineNumber === script.lineOffset) 214 if (lineNumber === script.lineOffset)
215 minColumnNumber = minColumnNumber ? Math.min(minColumnNumber, script.col umnOffset) : script.columnOffset; 215 minColumnNumber = minColumnNumber ? Math.min(minColumnNumber, script.col umnOffset) : script.columnOffset;
216 } 216 }
217 columnNumber = Math.max(columnNumber, minColumnNumber); 217 columnNumber = Math.max(columnNumber, minColumnNumber);
218 218
219 var target = this.target();
220 /** 219 /**
221 * @param {?Protocol.Error} error 220 * @param {?Protocol.Error} error
222 * @param {!Protocol.Debugger.BreakpointId} breakpointId 221 * @param {!Protocol.Debugger.BreakpointId} breakpointId
223 * @param {!Array.<!Protocol.Debugger.Location>} locations 222 * @param {!Array.<!Protocol.Debugger.Location>} locations
224 * @this {SDK.DebuggerModel} 223 * @this {SDK.DebuggerModel}
225 */ 224 */
226 function didSetBreakpoint(error, breakpointId, locations) { 225 function didSetBreakpoint(error, breakpointId, locations) {
227 if (callback) { 226 if (callback) {
228 var rawLocations = locations ? 227 var rawLocations = locations ?
229 locations.map(SDK.DebuggerModel.Location.fromPayload.bind(SDK.Debugg erModel.Location, this)) : 228 locations.map(SDK.DebuggerModel.Location.fromPayload.bind(SDK.Debugg erModel.Location, this)) :
230 []; 229 [];
231 callback(error ? null : breakpointId, rawLocations); 230 callback(error ? null : breakpointId, rawLocations);
232 } 231 }
233 } 232 }
234 this._agent.setBreakpointByUrl(lineNumber, url, undefined, columnNumber, con dition, didSetBreakpoint.bind(this)); 233 this._agent.setBreakpointByUrl(lineNumber, url, undefined, columnNumber, con dition, didSetBreakpoint.bind(this));
235 } 234 }
236 235
237 /** 236 /**
238 * @param {!SDK.DebuggerModel.Location} rawLocation 237 * @param {!SDK.DebuggerModel.Location} rawLocation
239 * @param {string} condition 238 * @param {string} condition
240 * @param {function(?Protocol.Debugger.BreakpointId, !Array.<!SDK.DebuggerMode l.Location>)=} callback 239 * @param {function(?Protocol.Debugger.BreakpointId, !Array.<!SDK.DebuggerMode l.Location>)=} callback
241 */ 240 */
242 setBreakpointBySourceId(rawLocation, condition, callback) { 241 setBreakpointBySourceId(rawLocation, condition, callback) {
243 var target = this.target();
244
245 /** 242 /**
246 * @this {SDK.DebuggerModel} 243 * @this {SDK.DebuggerModel}
247 * @param {?Protocol.Error} error 244 * @param {?Protocol.Error} error
248 * @param {!Protocol.Debugger.BreakpointId} breakpointId 245 * @param {!Protocol.Debugger.BreakpointId} breakpointId
249 * @param {!Protocol.Debugger.Location} actualLocation 246 * @param {!Protocol.Debugger.Location} actualLocation
250 */ 247 */
251 function didSetBreakpoint(error, breakpointId, actualLocation) { 248 function didSetBreakpoint(error, breakpointId, actualLocation) {
252 if (callback) { 249 if (callback) {
253 if (error || !actualLocation) { 250 if (error || !actualLocation) {
254 callback(null, []); 251 callback(null, []);
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 stack.callFrames.shift(); 1310 stack.callFrames.shift();
1314 if (previous && !stack.callFrames.length) 1311 if (previous && !stack.callFrames.length)
1315 previous.parent = stack.parent; 1312 previous.parent = stack.parent;
1316 else 1313 else
1317 previous = stack; 1314 previous = stack;
1318 stack = stack.parent; 1315 stack = stack.parent;
1319 } 1316 }
1320 return asyncStackTrace; 1317 return asyncStackTrace;
1321 } 1318 }
1322 }; 1319 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698