diff --git a/js/src/jsatom.cpp b/js/src/jsatom.cpp index a9596ce909ea..5cc64d3cb06c 100644 --- a/js/src/jsatom.cpp +++ b/js/src/jsatom.cpp @@ -385,14 +385,9 @@ js_TraceAtomState(JSTracer *trc) JSRuntime *rt = trc->runtime; JSAtomState *state = &rt->atomState; -#ifdef DEBUG - size_t number = 0; -#endif - if (rt->gcKeepAtoms) { for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) { - JS_SET_TRACING_INDEX(trc, "locked_atom", number++); - MarkAtom(trc, r.front().asPtr()); + MarkRoot(trc, r.front().asPtr(), "locked_atom"); } } else { for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) { @@ -400,8 +395,7 @@ js_TraceAtomState(JSTracer *trc) if (!entry.isTagged()) continue; - JS_SET_TRACING_INDEX(trc, "interned_atom", number++); - MarkAtom(trc, entry.asPtr()); + MarkRoot(trc, entry.asPtr(), "interned_atom"); } } } diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 31b2e4ca0789..d897fc8851ed 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -1447,7 +1447,7 @@ JSFunction::trace(JSTracer *trc) } if (atom) - MarkAtom(trc, atom, "atom"); + MarkStringUnbarriered(trc, atom, "atom"); if (isInterpreted()) { if (script()) diff --git a/js/src/jsgcmark.cpp b/js/src/jsgcmark.cpp index 0dd39a0a089b..581c6ed319cf 100644 --- a/js/src/jsgcmark.cpp +++ b/js/src/jsgcmark.cpp @@ -162,20 +162,6 @@ MarkString(JSTracer *trc, const MarkablePtr &str, const char *name) MarkStringUnbarriered(trc, str.value, name); } -void -MarkAtom(JSTracer *trc, JSAtom *atom) -{ - JS_ASSERT(trc); - JS_ASSERT(atom); - Mark(trc, atom); -} - -void -MarkAtom(JSTracer *trc, JSAtom *atom, const char *name) -{ - MarkStringUnbarriered(trc, atom, name); -} - void MarkObjectUnbarriered(JSTracer *trc, JSObject *obj, const char *name) { diff --git a/js/src/jsgcmark.h b/js/src/jsgcmark.h index d10ebd3855c3..c1410503edc2 100644 --- a/js/src/jsgcmark.h +++ b/js/src/jsgcmark.h @@ -51,12 +51,6 @@ namespace js { namespace gc { -void -MarkAtom(JSTracer *trc, JSAtom *str); - -void -MarkAtom(JSTracer *trc, JSAtom *str, const char *name); - void MarkObjectUnbarriered(JSTracer *trc, JSObject *obj, const char *name);