Skip to content

Commit

Permalink
[MERGE #5589 @meg-gupta] OS#18423345 : Use ToVarIntCheck in ToInteger…
Browse files Browse the repository at this point in the history
…Function, which will convert Number to TaggedInt if possible

Merge pull request #5589 from meg-gupta:indexof

This will mitigate taking slow path if indexOf ever gets a Number as the index.
  • Loading branch information
Meghana Gupta committed Aug 13, 2018
2 parents 3a7377d + 9e9eaab commit 2c4085b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ namespace Js
return value;
}

return JavascriptNumber::ToVarNoCheck(JavascriptConversion::ToInteger(value, scriptContext), scriptContext);
return JavascriptNumber::ToVarIntCheck(JavascriptConversion::ToInteger(value, scriptContext), scriptContext);
}

Var JsBuiltInEngineInterfaceExtensionObject::EntryJsBuiltIn_Internal_GetLength(RecyclableObject *function, CallInfo callInfo, ...)
Expand Down

0 comments on commit 2c4085b

Please sign in to comment.