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

Commit

Permalink
[Merge chakra-core/ChakraCore@7f0403e0e8] [MERGE #3845 @obastemur] Ca…
Browse files Browse the repository at this point in the history
…nonicalizeAccessor returns wrong results on cross thread

Merge pull request #3845 from obastemur:fix_ctt

`accessor` might be initialized under a different context hence `library->Undefined != accessor's->library->Undefined`

Recently added an Assert to IsUndefinedObject** checks. That assert helped revealing this issue.

See also https://github.com/Microsoft/ChakraCore/blame/master/lib/Runtime/Types/DictionaryTypeHandler.cpp#L2020
  • Loading branch information
chakrabot committed Oct 1, 2017
1 parent 6852c75 commit 9ba2671
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ namespace Js
template <typename T>
Var DictionaryTypeHandlerBase<T>::CanonicalizeAccessor(Var accessor, /*const*/ JavascriptLibrary* library)
{
if (accessor == nullptr || JavascriptOperators::IsUndefinedObject(accessor, library))
if (accessor == nullptr || JavascriptOperators::IsUndefinedObject(accessor))
{
accessor = library->GetDefaultAccessorFunction();
}
Expand Down

0 comments on commit 9ba2671

Please sign in to comment.