You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect inspection of Set iterator for set.entries() #24629
AFAIC this works as intended. With the change to using Object::PreviewEntries this difference has been discussed as well and we decided to follow chrome.
The set entries only contain the values, so there is no need to display it as an array with the value duplicated.
@BridgeAR its not an accurate representation of the actual iterator results though...
>newSet([2,4]).entries()[SetIterator]{2,4}>// oh ok its just some numbers>newSet([2,4]).entries().next(){value: [2,2],done: false}>// wait value is an array now?>
I just fixed Object::PreviewEntries to work as intended locally and I'll raise a PR to V8 as soon as I set up the whole machinery for V8 PRs and I'll backport that as soon as it lands.
Activity
devsnek commentedon Nov 24, 2018
Object::PreviewEntries reports unkeyed and gives the flat array.
@nodejs/v8
targos commentedon Nov 24, 2018
Yeah, Chrome has the same behavior:
Trott commentedon Nov 24, 2018
/ping @BridgeAR
BridgeAR commentedon Nov 24, 2018
AFAIC this works as intended. With the change to using
Object::PreviewEntriesthis difference has been discussed as well and we decided to follow chrome.The set entries only contain the values, so there is no need to display it as an array with the value duplicated.
devsnek commentedon Nov 24, 2018
@BridgeAR its not an accurate representation of the actual iterator results though...
targos commentedon Nov 24, 2018
It's true that they contain the values but they are still in arrays, so IMHO it is confusing to not see that in the preview.
BridgeAR commentedon Nov 25, 2018
I just fixed
Object::PreviewEntriesto work as intended locally and I'll raise a PR to V8 as soon as I set up the whole machinery for V8 PRs and I'll backport that as soon as it lands.Refs: #20831 (the original PR that changed the behavior)
targos commentedon Dec 16, 2018
@BridgeAR what's the status?
BridgeAR commentedon Dec 18, 2018
@targos I have to fix the Node.js test expectation first in another PR for V8 as those tests will now fail (Which is intended). I am working on that.
The actual CL to fix the preview: https://chromium-review.googlesource.com/c/v8/v8/+/1350790
Fix preview of set entries
3 remaining items
util: update set iterator entries inspection
deps: V8: backport 74571c8
util: update set iterator entries inspection
deps: V8: backport 74571c8
util: update set iterator entries inspection
deps: V8: cherry-pick 74571c8
deps: V8: cherry-pick 74571c8
deps: V8: cherry-pick 74571c8