summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-07-29 12:01:55 +0000
committerMoonchild <moonchild@palemoon.org>2021-07-29 12:01:55 +0000
commit2953dea62ada19544ef1084eb74a29542532e727 (patch)
tree15589bb67ed9958fcb50d712bbdb9f54a47aa0f2
parentbe71268987ce2386176223dbd063fef0cbc7c134 (diff)
downloaduxp-2953dea62ada19544ef1084eb74a29542532e727.tar.gz
Explicitly allocate *{lhs|rhs}->name() to ZoneVector<uc16>
Since ZoneVector<> is a wrapper around std::vector<>, this -should- be equivalent to the direct comparison. (confidence: 70%)
-rw-r--r--js/src/regexp/regexp-parser.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/src/regexp/regexp-parser.h b/js/src/regexp/regexp-parser.h
index 131d12161f..4b0ec3832f 100644
--- a/js/src/regexp/regexp-parser.h
+++ b/js/src/regexp/regexp-parser.h
@@ -327,7 +327,9 @@ class V8_EXPORT_PRIVATE RegExpParser {
bool operator()(const RegExpCapture* lhs, const RegExpCapture* rhs) const {
DCHECK_NOT_NULL(lhs);
DCHECK_NOT_NULL(rhs);
- return *lhs->name() < *rhs->name();
+ ZoneVector<uc16> lhname = *lhs->name();
+ ZoneVector<uc16> rhname = *rhs->name();
+ return lhname < rhname;
}
};