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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/SourceMapNamesResolver.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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 Sources.SourceMapNamesResolver = {}; 4 Sources.SourceMapNamesResolver = {};
5 5
6 Sources.SourceMapNamesResolver._cachedMapSymbol = Symbol('cache'); 6 Sources.SourceMapNamesResolver._cachedMapSymbol = Symbol('cache');
7 Sources.SourceMapNamesResolver._cachedIdentifiersSymbol = Symbol('cachedIdentifi ers'); 7 Sources.SourceMapNamesResolver._cachedIdentifiersSymbol = Symbol('cachedIdentifi ers');
8 8
9 /** 9 /**
10 * @unrestricted 10 * @unrestricted
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 /** 58 /**
59 * @param {!Common.Text} text 59 * @param {!Common.Text} text
60 * @param {number} scopeStart 60 * @param {number} scopeStart
61 * @param {string} prefix 61 * @param {string} prefix
62 * @param {!Array<!{name: string, offset: number}>} identifiers 62 * @param {!Array<!{name: string, offset: number}>} identifiers
63 * @return {!Array<!Sources.SourceMapNamesResolver.Identifier>} 63 * @return {!Array<!Sources.SourceMapNamesResolver.Identifier>}
64 */ 64 */
65 function onIdentifiers(text, scopeStart, prefix, identifiers) { 65 function onIdentifiers(text, scopeStart, prefix, identifiers) {
66 var result = []; 66 var result = [];
67 var cursor = new Common.TextCursor(text.lineEndings()); 67 var cursor = new Common.TextCursor(text.lineEndings());
68 var promises = [];
69 for (var i = 0; i < identifiers.length; ++i) { 68 for (var i = 0; i < identifiers.length; ++i) {
70 var id = identifiers[i]; 69 var id = identifiers[i];
71 if (id.offset < prefix.length) 70 if (id.offset < prefix.length)
72 continue; 71 continue;
73 var start = scopeStart + id.offset - prefix.length; 72 var start = scopeStart + id.offset - prefix.length;
74 cursor.resetTo(start); 73 cursor.resetTo(start);
75 result.push(new Sources.SourceMapNamesResolver.Identifier(id.name, cursor. lineNumber(), cursor.columnNumber())); 74 result.push(new Sources.SourceMapNamesResolver.Identifier(id.name, cursor. lineNumber(), cursor.columnNumber()));
76 } 75 }
77 return result; 76 return result;
78 } 77 }
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 531 }
533 532
534 /** 533 /**
535 * @override 534 * @override
536 * @return {boolean} 535 * @return {boolean}
537 */ 536 */
538 isNode() { 537 isNode() {
539 return this._object.isNode(); 538 return this._object.isNode();
540 } 539 }
541 }; 540 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698