Bug 783540 - add missing STRINGVECTOR case in AutoGCRooter::trace (r=bhackett)

This commit is contained in:
Luke Wagner 2012-08-17 11:21:57 -07:00
parent 7a8bcb7e5b
commit eac38cd145
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,5 @@
gczeal(2, 2)
var stringA = "abcdef";
var stringB = "ghijk";
var stringC = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz";
(stringA + stringB + stringC).replace('abc', 'AA')

View File

@ -2341,6 +2341,12 @@ AutoGCRooter::trace(JSTracer *trc)
return;
}
case STRINGVECTOR: {
AutoStringVector::VectorImpl &vector = static_cast<AutoStringVector *>(this)->vector;
MarkStringRootRange(trc, vector.length(), vector.begin(), "js::AutoStringVector.vector");
return;
}
case NAMEVECTOR: {
AutoNameVector::VectorImpl &vector = static_cast<AutoNameVector *>(this)->vector;
MarkStringRootRange(trc, vector.length(), vector.begin(), "js::AutoNameVector.vector");