Bug 985695 - Rename JSContext::getLazyType to getSingletonType, because that's the only sense in which it's used. r=terrence

--HG--
extra : rebase_source : db9807b0c311c334ae38409f0dfee259f968b8d3
This commit is contained in:
Jeff Walden 2014-02-07 16:50:28 -08:00
parent f8e657144b
commit ecbe902a2d
3 changed files with 4 additions and 3 deletions

View File

@ -367,7 +367,7 @@ class ExclusiveContext : public ThreadSafeContext
// Zone local methods that can be used freely from an ExclusiveContext.
types::TypeObject *getNewType(const Class *clasp, TaggedProto proto, JSFunction *fun = nullptr);
types::TypeObject *getLazyType(const Class *clasp, TaggedProto proto);
types::TypeObject *getSingletonType(const Class *clasp, TaggedProto proto);
inline js::LifoAlloc &typeLifoAlloc();
// Current global. This is only safe to use within the scope of the

View File

@ -3923,7 +3923,7 @@ JSCompartment::checkNewTypeObjectTableAfterMovingGC()
#endif
TypeObject *
ExclusiveContext::getLazyType(const Class *clasp, TaggedProto proto)
ExclusiveContext::getSingletonType(const Class *clasp, TaggedProto proto)
{
JS_ASSERT_IF(proto.isObject(), compartment() == proto.toObject()->compartment());
@ -3951,6 +3951,7 @@ ExclusiveContext::getLazyType(const Class *clasp, TaggedProto proto)
return nullptr;
type->initSingleton((JSObject *) TypeObject::LAZY_SINGLETON);
MOZ_ASSERT(type->singleton(), "created type must be a proper singleton");
return type;
}

View File

@ -376,7 +376,7 @@ JSObject::setSingletonType(js::ExclusiveContext *cx, js::HandleObject obj)
JS_ASSERT_IF(cx->isJSContext(),
!IsInsideNursery(cx->asJSContext()->runtime(), obj.get()));
js::types::TypeObject *type = cx->getLazyType(obj->getClass(), obj->getTaggedProto());
js::types::TypeObject *type = cx->getSingletonType(obj->getClass(), obj->getTaggedProto());
if (!type)
return false;