Bug 1277890 - part 1 - avoid unnecessary refcounting when building the filters list; r=baku

We can pass the atom reference we have into the filter list, there's no
need for the filter list to retain a separate reference of the atom.
This commit is contained in:
Nathan Froyd 2016-06-07 04:10:25 -04:00
Родитель 2be85aa542
Коммит 9190866b93
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -685,8 +685,7 @@ nsDOMMutationObserver::Observe(nsINode& aTarget,
filters.SetCapacity(len); filters.SetCapacity(len);
for (uint32_t i = 0; i < len; ++i) { for (uint32_t i = 0; i < len; ++i) {
nsCOMPtr<nsIAtom> a = NS_Atomize(filtersAsString[i]); filters.AppendElement(NS_Atomize(filtersAsString[i]));
filters.AppendObject(a);
} }
} }