Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
deps: update ChakraCore to chakra-core/ChakraCore@2bd57e547a
Browse files Browse the repository at this point in the history
[MERGE #5454 @atulkatti] MSFT:16597129 Relax assert in TypePropertyCache::TryGetProperty for cases where implicit calls may be disabled.

Merge pull request #5454 from atulkatti:Bug16597129.TypePropertyCache.CEO.1

Reviewed-By: chakrabot <[email protected]>
  • Loading branch information
Atul Katti authored and kfarnung committed Jul 18, 2018
1 parent 9c6af75 commit 5a5a284
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions deps/chakrashim/core/lib/Runtime/Language/InlineCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,11 @@ namespace Js
ScriptContext *const requestContext)
{
*propertyValue = InlineCache::GetPropertyValue<slotType>(cache->GetSourceObject<cacheType>(propertyObject), cache->GetSlotIndex<cacheType>());
Assert(*propertyValue == JavascriptOperators::GetProperty(propertyObject, propertyId, requestContext) ||
(RootObjectBase::Is(propertyObject) && *propertyValue == JavascriptOperators::GetRootProperty(propertyObject, propertyId, requestContext)));
DebugOnly(Var getPropertyValue = JavascriptOperators::GetProperty(propertyObject, propertyId, requestContext));
Assert(*propertyValue == getPropertyValue ||
(RootObjectBase::Is(propertyObject) && *propertyValue == JavascriptOperators::GetRootProperty(propertyObject, propertyId, requestContext))||
// In some cases, such as CustomExternalObject, if implicit calls are disabled GetPropertyQuery may return null. See CustomExternalObject::GetPropertyQuery for an example.
(getPropertyValue == requestContext->GetLibrary()->GetNull() && requestContext->GetThreadContext()->IsDisableImplicitCall() && propertyObject->GetType()->IsExternal()));
}
};
};
Expand Down
5 changes: 4 additions & 1 deletion deps/chakrashim/core/lib/Runtime/Types/TypePropertyCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,10 @@ namespace Js
{
if (!OutputExistence)
{
Assert(*propertyValue == JavascriptOperators::GetProperty(propertyObject, propertyId, requestContext));
DebugOnly(Var getPropertyValue = JavascriptOperators::GetProperty(propertyObject, propertyId, requestContext));
Assert(*propertyValue == getPropertyValue ||
// In some cases, such as CustomExternalObject, if implicit calls are disabled GetPropertyQuery may return null. See CustomExternalObject::GetPropertyQuery for an example.
(getPropertyValue == requestContext->GetLibrary()->GetNull() && requestContext->GetThreadContext()->IsDisableImplicitCall() && propertyObject->GetType()->IsExternal()));
}

if(propertyObject->GetScriptContext() != requestContext)
Expand Down

0 comments on commit 5a5a284

Please sign in to comment.