Bug 1098618 - Use a smaller initial IdSet size in jsiter.cpp:Snapshot(). r=sfink.

--HG--
extra : rebase_source : b506099d2a57f0c0199e2bd2713309630ebe03d3
This commit is contained in:
Nicholas Nethercote 2014-11-13 18:06:24 -08:00
parent 35cc9a57cf
commit 990f22e72d

View File

@ -273,8 +273,9 @@ struct SortComparatorIds
static bool
Snapshot(JSContext *cx, HandleObject pobj_, unsigned flags, AutoIdVector *props)
{
// ~90% of the time this table ends up with 3 or fewer elements.
IdSet ht(cx);
if (!ht.init(32))
if (!ht.init(3))
return false;
RootedObject pobj(cx, pobj_);