Bug 1364386 - Use only file name for search; r=nchevobbe

MozReview-Commit-ID: U26CX1EbLP

--HG--
extra : rebase_source : cb97fcdf715441e9d674e66f75518f6b7ef55ee1
This commit is contained in:
Jan Odvarko 2017-05-16 16:25:08 +02:00
Родитель 6def6a2c07
Коммит f03907e6ec
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -9,6 +9,7 @@ const { l10n } = require("devtools/client/webconsole/new-console-output/utils/me
const { getAllFilters } = require("devtools/client/webconsole/new-console-output/selectors/filters");
const { getLogLimit } = require("devtools/client/webconsole/new-console-output/selectors/prefs");
const { getGripPreviewItems } = require("devtools/client/shared/components/reps/reps");
const { getSourceNames } = require("devtools/client/shared/source-utils");
const {
MESSAGE_TYPE,
MESSAGE_SOURCE
@ -131,8 +132,9 @@ function isTextInFrame(text, frame) {
if (!frame) {
return false;
}
return Object.values(frame)
.join(":")
const { short } = getSourceNames(frame.source);
return `${short}:${frame.line}:${frame.column}`
.toLocaleLowerCase()
.includes(text.toLocaleLowerCase());
}