chakra-core / chakra-core/ChakraCore
eval() function will cause "arguments" property missing in JsDiagGetStackProperties result
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
repro steps:
1.run script from https://github.com/JohnMasen/ChakraCore.NET/blob/master/source/RunScript/Scripts/Debugging/app.js
make sure line 14 [`eval("let cc=10;");`] is uncommented.
2.set breakpoint at line 9 (it actually effects on whole root stack)
3.call JsDiagGetStackProperties when breakpoint hit
expected result:
`{"thisObject":{"name":"this","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":2},"arguments":{"name":"arguments","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":3},"locals":[{"name":"a","type":"string","value":"abc","propertyAttributes":1,"handle":4},{"name":"b","type":"string","value":"abc","propertyAttributes":1,"handle":5},{"name":"c","type":"string","value":"abcabc","propertyAttributes":1,"handle":6},{"name":"f","type":"string","value":"abcabcabcabc","propertyAttributes":1,"handle":7},{"name":"o","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":8},{"name":"o2","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":9},{"name":"ff","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":10},{"name":"ff2","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":11}],"scopes":[],"globals":{"handle":12}}`
Actual result
`{"thisObject":{"name":"this","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":2},"locals":[{"name":"arguments","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":3},{"name":"a","type":"string","value":"abc","propertyAttributes":1,"handle":4},{"name":"b","type":"string","value":"abc","propertyAttributes":1,"handle":5},{"name":"c","type":"string","value":"abcabc","propertyAttributes":1,"handle":6},{"name":"f","type":"string","value":"abcabcabcabc","propertyAttributes":1,"handle":7},{"name":"o","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":8},{"name":"o2","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":9},{"name":"ff","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":10},{"name":"ff2","type":"string","value":"[Uninitialized block variable]","propertyAttributes":13,"handle":11}],"scopes":[{"index":0,"handle":12},{"index":1,"handle":13}],"globals":{"handle":14}}`
### Screenshot for result compare: (arguments becomes part of local variables after eval() function uncommented)
## With Eval() function


## Without Eval() function


Contributor guide
Assessment
This issue has not been assessed yet.