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

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

Issue 2515763003: DevTools: use shorthand syntax in interface definitions. (Closed)
Patch Set: Created 4 years, 1 month 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 function resolveSourceName(id) { 145 function resolveSourceName(id) {
146 var startEntry = sourceMap.findEntry(id.lineNumber, id.columnNumber); 146 var startEntry = sourceMap.findEntry(id.lineNumber, id.columnNumber);
147 var endEntry = sourceMap.findEntry(id.lineNumber, id.columnNumber + id.name. length); 147 var endEntry = sourceMap.findEntry(id.lineNumber, id.columnNumber + id.name. length);
148 if (!startEntry || !endEntry || !startEntry.sourceURL || startEntry.sourceUR L !== endEntry.sourceURL || 148 if (!startEntry || !endEntry || !startEntry.sourceURL || startEntry.sourceUR L !== endEntry.sourceURL ||
149 !startEntry.sourceLineNumber || !startEntry.sourceColumnNumber || !endEn try.sourceLineNumber || 149 !startEntry.sourceLineNumber || !startEntry.sourceColumnNumber || !endEn try.sourceLineNumber ||
150 !endEntry.sourceColumnNumber) 150 !endEntry.sourceColumnNumber)
151 return Promise.resolve(/** @type {?string} */ (null)); 151 return Promise.resolve(/** @type {?string} */ (null));
152 var sourceTextRange = new Common.TextRange( 152 var sourceTextRange = new Common.TextRange(
153 startEntry.sourceLineNumber, startEntry.sourceColumnNumber, endEntry.sou rceLineNumber, 153 startEntry.sourceLineNumber, startEntry.sourceColumnNumber, endEntry.sou rceLineNumber,
154 endEntry.sourceColumnNumber); 154 endEntry.sourceColumnNumber);
155 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(Workspac e.workspace, startEntry.sourceURL, script); 155 var uiSourceCode =
156 Bindings.NetworkProject.uiSourceCodeForScriptURL(Workspace.workspace, st artEntry.sourceURL, script);
156 if (!uiSourceCode) 157 if (!uiSourceCode)
157 return Promise.resolve(/** @type {?string} */ (null)); 158 return Promise.resolve(/** @type {?string} */ (null));
158 159
159 return uiSourceCode.requestContent().then(onSourceContent.bind(null, sourceT extRange)); 160 return uiSourceCode.requestContent().then(onSourceContent.bind(null, sourceT extRange));
160 } 161 }
161 162
162 /** 163 /**
163 * @param {!Common.TextRange} sourceTextRange 164 * @param {!Common.TextRange} sourceTextRange
164 * @param {?string} content 165 * @param {?string} content
165 * @return {?string} 166 * @return {?string}
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 } 544 }
544 545
545 /** 546 /**
546 * @override 547 * @override
547 * @return {boolean} 548 * @return {boolean}
548 */ 549 */
549 isNode() { 550 isNode() {
550 return this._object.isNode(); 551 return this._object.isNode();
551 } 552 }
552 }; 553 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698