Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeHolman committed Sep 9, 2019
1 parent b75847e commit 31f2588
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Runtime/Library/BoundFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ namespace Js
Var varLength;
if (targetFunction->GetProperty(targetFunction, PropertyIds::length, &varLength, nullptr, requestContext))
{
if (!TaggedInt::Is(varLength))
{
// ToInt32 conversion on non-primitive length can invalidate assumptions made by the JIT,
// so add implicit call flag if length isn't a TaggedInt already
requestContext->GetThreadContext()->AddImplicitCallFlags(ImplicitCall_Accessor);
}
len = JavascriptConversion::ToInt32(varLength, requestContext);
}

Expand Down

0 comments on commit 31f2588

Please sign in to comment.