Bug 1563474 - Remove unused getScriptInfo from Parser.jsm r=nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D39321

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julian Descottes 2019-07-25 11:38:59 +00:00
Родитель 28062cdd3c
Коммит d55d46038c
1 изменённых файлов: 0 добавлений и 25 удалений

Просмотреть файл

@ -176,31 +176,6 @@ SyntaxTreesPool.prototype = {
return this._trees.length;
},
/**
* Finds the start and length of the script containing the specified offset
* relative to its parent source.
*
* @param number atOffset
* The offset relative to the parent source.
* @return object
* The offset and length relative to the enclosing script.
*/
getScriptInfo(atOffset) {
const info = { start: -1, length: -1, index: -1 };
for (const { offset, length } of this._trees) {
info.index++;
if (offset <= atOffset && offset + length >= atOffset) {
info.start = offset;
info.length = length;
return info;
}
}
info.index = -1;
return info;
},
/**
* Handles a request for a specific or all known syntax trees.
*