Bug 1051155 - Simplify and clean up TypeNewScript, r=jandem.
This commit is contained in:
@@ -1686,7 +1686,7 @@ static inline JSObject *
|
||||
CreateThisForFunctionWithType(JSContext *cx, HandleTypeObject type, JSObject *parent,
|
||||
NewObjectKind newKind)
|
||||
{
|
||||
if (type->hasNewScript()) {
|
||||
if (type->newScript()) {
|
||||
/*
|
||||
* Make an object with the type's associated finalize kind and shape,
|
||||
* which reflects any properties that will definitely be added to the
|
||||
@@ -2905,7 +2905,7 @@ JSObject::growSlots(ThreadSafeContext *cx, HandleObject obj, uint32_t oldCount,
|
||||
* type to give these objects a larger number of fixed slots when future
|
||||
* objects are constructed.
|
||||
*/
|
||||
if (!obj->hasLazyType() && !oldCount && obj->type()->hasNewScript()) {
|
||||
if (!obj->hasLazyType() && !oldCount && obj->type()->newScript()) {
|
||||
JSObject *oldTemplate = obj->type()->newScript()->templateObject;
|
||||
gc::AllocKind kind = gc::GetGCObjectFixedSlotsKind(oldTemplate->numFixedSlots());
|
||||
uint32_t newScriptSlots = gc::GetGCKindSlots(kind);
|
||||
|
||||
Reference in New Issue
Block a user