Skip to content

Commit 4066031

Browse files
author
Meghana Gupta
committed
[1.10>master] [MERGE #5589 @meg-gupta] OS#18423345 : Use ToVarIntCheck in ToIntegerFunction, 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.
2 parents f5c33ac + 2c4085b commit 4066031

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Runtime/Library/JsBuiltInEngineInterfaceExtensionObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ namespace Js
416416
return value;
417417
}
418418

419-
return JavascriptNumber::ToVarNoCheck(JavascriptConversion::ToInteger(value, scriptContext), scriptContext);
419+
return JavascriptNumber::ToVarIntCheck(JavascriptConversion::ToInteger(value, scriptContext), scriptContext);
420420
}
421421

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

0 commit comments

Comments
 (0)