@@ -403,18 +403,20 @@ namespace Js
403
403
strictHeapArgumentsTypePath->Add <true /* isSetter*/ >(BuiltInPropertyRecords::callee);
404
404
strictHeapArgumentsTypePath->Add (BuiltInPropertyRecords::length);
405
405
strictHeapArgumentsTypePath->Add (BuiltInPropertyRecords::_symbolIterator);
406
- ObjectSlotAttributes *strictHeapArgumentsAttributes = RecyclerNewArrayLeaf (recycler, ObjectSlotAttributes, strictHeapArgumentsTypePath->GetPathSize ());
406
+ uint8 strictHeapArgumentsTypePathSize = strictHeapArgumentsTypePath->GetPathSize ();
407
+ AnalysisAssert (strictHeapArgumentsTypePathSize >= 4 );
408
+ ObjectSlotAttributes *strictHeapArgumentsAttributes = RecyclerNewArrayLeaf (recycler, ObjectSlotAttributes, strictHeapArgumentsTypePathSize);
407
409
strictHeapArgumentsAttributes[0 ] = (ObjectSlotAttributes)(ObjectSlotAttr_Writable | ObjectSlotAttr_Accessor);
408
410
strictHeapArgumentsAttributes[1 ] = ObjectSlotAttr_Setter;
409
411
strictHeapArgumentsAttributes[2 ] = (ObjectSlotAttributes)PropertyBuiltInMethodDefaults;
410
412
strictHeapArgumentsAttributes[3 ] = (ObjectSlotAttributes)PropertyBuiltInMethodDefaults;
411
- for (int i = 4 ; i < strictHeapArgumentsTypePath-> GetPathSize () ; ++i)
413
+ for (int i = 4 ; i < strictHeapArgumentsTypePathSize ; ++i)
412
414
{
413
415
strictHeapArgumentsAttributes[i] = ObjectSlotAttr_Default;
414
416
}
415
- PathTypeSetterSlotIndex * strictHeapArgumentsSetters = RecyclerNewArrayLeaf (recycler, PathTypeSetterSlotIndex, strictHeapArgumentsTypePath-> GetPathSize () );
417
+ PathTypeSetterSlotIndex * strictHeapArgumentsSetters = RecyclerNewArrayLeaf (recycler, PathTypeSetterSlotIndex, strictHeapArgumentsTypePathSize );
416
418
strictHeapArgumentsSetters[0 ] = 1 ;
417
- for (int i = 1 ; i < strictHeapArgumentsTypePath-> GetPathSize () ; ++i)
419
+ for (int i = 1 ; i < strictHeapArgumentsTypePathSize ; ++i)
418
420
{
419
421
strictHeapArgumentsSetters[i] = NoSetterSlot;
420
422
}
0 commit comments