This commit is contained in:
Cameron Kaiser 2020-05-18 21:00:28 -07:00
parent a7f14df010
commit 17da05f15c
1 changed files with 3 additions and 2 deletions

View File

@ -1372,7 +1372,8 @@ class StringSegmentRange
{
// If malloc() shows up in any profiles from this vector, we can add a new
// StackAllocPolicy which stashes a reusable freed-at-gc buffer in the cx.
Rooted<StringVector> stack;
using StackVector = js::TraceableVector<JSString*, 16>;
Rooted<StackVector> stack;
RootedLinearString cur;
bool settle(JSString* str) {
@ -1388,7 +1389,7 @@ class StringSegmentRange
public:
explicit StringSegmentRange(JSContext* cx)
: stack(cx, StringVector(cx)), cur(cx)
: stack(cx, StackVector(cx)), cur(cx)
{}
MOZ_WARN_UNUSED_RESULT bool init(JSString* str) {