|
|
@@ -1550,9 +1550,9 @@ namespace Js
|
|
|
char16 reason[1024];
|
|
|
swprintf_s(reason, 1024, _u("Cache not populated."));
|
|
|
#endif
|
|
|
- if (useCache && newPrototype->GetInternalProperty(newPrototype, Js::InternalPropertyIds::TypeOfPrototypeObjectDictionary, (Js::Var*)&oldTypeToPromotedTypeMap, nullptr, scriptContext))
|
|
|
+ if (useCache && newPrototype->GetInternalProperty(newPrototype, Js::InternalPropertyIds::TypeOfPrototypeObjectDictionary, (Js::Var*)&oldTypeToPromotedTypeMap, nullptr, scriptContext) && oldTypeToPromotedTypeMap != nullptr)
|
|
|
{
|
|
|
- Assert(oldTypeToPromotedTypeMap && (Js::Var)oldTypeToPromotedTypeMap != scriptContext->GetLibrary()->GetUndefined());
|
|
|
+ AssertOrFailFast((Js::Var)oldTypeToPromotedTypeMap != scriptContext->GetLibrary()->GetUndefined());
|
|
|
oldTypeToPromotedTypeMap = reinterpret_cast<TypeTransitionMap*>(oldTypeToPromotedTypeMap);
|
|
|
|
|
|
if (oldTypeToPromotedTypeMap->TryGetValue(oldType, &cachedDynamicType))
|