Avoid unnecessary dynamic allocation when calling script functions.

Use tracer instead of rooting in ValueCloner, to avoid memory
allocations.

This was SVN commit r7770.
This commit is contained in:
Ykkrosh
2010-07-19 23:03:33 +00:00
parent 9674c3c0fe
commit c4350d86de
4 changed files with 46 additions and 48 deletions
+5
View File
@@ -42,4 +42,9 @@ void AutoGCRooter::Trace(JSTracer* trc)
{
JS_CALL_OBJECT_TRACER(trc, m_Objects[i], "AutoGCRooter object");
}
for (size_t i = 0; i < m_Vals.size(); ++i)
{
JS_CALL_VALUE_TRACER(trc, m_Vals[i], "AutoGCRooter val");
}
}