mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 755583 (part 2) - Use RegExp.test instead of String.match in aboutMemory.js. r=nnethercote.
This commit is contained in:
parent
82518cb83c
commit
7c41cdba29
@ -266,7 +266,7 @@ function checkReport(aUnsafePath, aKind, aUnits, aAmount, aDescription)
|
|||||||
if (aUnsafePath.startsWith("explicit/")) {
|
if (aUnsafePath.startsWith("explicit/")) {
|
||||||
assert(aKind === KIND_HEAP || aKind === KIND_NONHEAP, "bad explicit kind");
|
assert(aKind === KIND_HEAP || aKind === KIND_NONHEAP, "bad explicit kind");
|
||||||
assert(aUnits === UNITS_BYTES, "bad explicit units");
|
assert(aUnits === UNITS_BYTES, "bad explicit units");
|
||||||
assert(aDescription.match(gSentenceRegExp),
|
assert(gSentenceRegExp.test(aDescription),
|
||||||
"non-sentence explicit description");
|
"non-sentence explicit description");
|
||||||
|
|
||||||
} else if (aUnsafePath.startsWith("smaps/")) {
|
} else if (aUnsafePath.startsWith("smaps/")) {
|
||||||
@ -281,9 +281,9 @@ function checkReport(aUnsafePath, aKind, aUnits, aAmount, aDescription)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
assert(aUnsafePath.indexOf("/") === -1, "'other' path contains '/'");
|
assert(aUnsafePath.indexOf("/") === -1, "'other' path contains '/'");
|
||||||
assert(aKind === KIND_OTHER, "bad other kind: " + aUnsafePath);
|
assert(aKind === KIND_OTHER, "bad other kind");
|
||||||
assert(aDescription.match(gSentenceRegExp),
|
assert(gSentenceRegExp.test(aDescription),
|
||||||
"non-sentence other description " + aDescription);
|
"non-sentence other description");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user