Backed out changeset fde265c467b2 (Bug 902095) for SM(r) bustage
This commit is contained in:
@@ -117,14 +117,13 @@ const char js_yield_str[] = "yield";
|
||||
bool
|
||||
js::InitAtoms(JSRuntime *rt)
|
||||
{
|
||||
AutoLockForExclusiveAccess lock(rt);
|
||||
return rt->atoms().init(JS_STRING_HASH_COUNT);
|
||||
return rt->atoms.init(JS_STRING_HASH_COUNT);
|
||||
}
|
||||
|
||||
void
|
||||
js::FinishAtoms(JSRuntime *rt)
|
||||
{
|
||||
AtomSet &atoms = rt->atoms();
|
||||
AtomSet &atoms = rt->atoms;
|
||||
if (!atoms.initialized()) {
|
||||
/*
|
||||
* We are called with uninitialized state when JS_NewRuntime fails and
|
||||
@@ -182,7 +181,7 @@ void
|
||||
js::MarkAtoms(JSTracer *trc)
|
||||
{
|
||||
JSRuntime *rt = trc->runtime;
|
||||
for (AtomSet::Range r = rt->atoms().all(); !r.empty(); r.popFront()) {
|
||||
for (AtomSet::Range r = rt->atoms.all(); !r.empty(); r.popFront()) {
|
||||
AtomStateEntry entry = r.front();
|
||||
if (!entry.isTagged())
|
||||
continue;
|
||||
@@ -196,7 +195,7 @@ js::MarkAtoms(JSTracer *trc)
|
||||
void
|
||||
js::SweepAtoms(JSRuntime *rt)
|
||||
{
|
||||
for (AtomSet::Enum e(rt->atoms()); !e.empty(); e.popFront()) {
|
||||
for (AtomSet::Enum e(rt->atoms); !e.empty(); e.popFront()) {
|
||||
AtomStateEntry entry = e.front();
|
||||
JSAtom *atom = entry.asPtr();
|
||||
bool isDying = IsStringAboutToBeFinalized(&atom);
|
||||
@@ -216,9 +215,7 @@ AtomIsInterned(JSContext *cx, JSAtom *atom)
|
||||
if (StaticStrings::isStatic(atom))
|
||||
return true;
|
||||
|
||||
AutoLockForExclusiveAccess lock(cx);
|
||||
|
||||
AtomSet::Ptr p = cx->runtime()->atoms().lookup(atom);
|
||||
AtomSet::Ptr p = cx->runtime()->atoms.lookup(atom);
|
||||
if (!p)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user