void js::MarkAtoms(JSTracer* trc) { JSRuntime* rt = trc->runtime(); for (AtomSet::Enum e(rt->atoms()); !e.empty(); e.popFront()) { const AtomStateEntry& entry = e.front(); if (!entry.isPinned()) continue; JSAtom* atom = entry.asPtrUnbarriered(); TraceRoot(trc, &atom, "interned_atom"); MOZ_ASSERT(entry.asPtrUnbarriered() == atom); } }
void js::MarkAtoms(JSTracer *trc) { JSRuntime *rt = trc->runtime; for (AtomSet::Enum e(rt->atoms()); !e.empty(); e.popFront()) { const AtomStateEntry &entry = e.front(); if (!entry.isTagged()) continue; JSAtom *atom = entry.asPtr(); bool tagged = entry.isTagged(); MarkStringRoot(trc, &atom, "interned_atom"); if (entry.asPtr() != atom) e.rekeyFront(AtomHasher::Lookup(atom), AtomStateEntry(atom, tagged)); } }