chakra-core / chakra-core/ChakraCore
JSRT APIs JsConvertValueToString and JsGetProperty fail if the input value is taggedInt instead of Object
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
We are incorrectly treating taggedInt as JavascriptNumber.
Same as [OS 6980708](https://microsoft.visualstudio.com/web/wi.aspx?pcguid=cb55739e-4afe-46a3-970f-1b49d8ee7564&id=6980708)
**Details from the bug above:**
I was trying to convert something to a string in an external function. Instead of calling JsConvertValueToString, I tried to get the "toString" method and call it.
```
MyExternalFunction(..., JsValueRef *pArguments, ...)
{
...
JsGetProperty(pArguments[...], propIdToString, &jsToString);
...
}
```
fails with `JsErrorArgumentNotObject` when I call it on `TaggedInt`.
I can do this for string conversion:
`host.externalFunction()`
I cannot do this:
`host.externalFunction(42)`
Contributor guide
Assessment
This issue has not been assessed yet.