• Benedikt Meurer's avatar
    [inspector] Add nonIndexedPropertiesOnly to Runtime.getProperties. · ffa4cda6
    Benedikt Meurer authored
    This introduces a new, optional `nonIndexedPropertiesOnly` flag to the
    `Runtime.getProperties` inspector request, which tells the inspector to
    only report properties whose name is not an (typed) array index. This is
    to support retrieving all properties except for the indexed ones when
    the DevTools front-end decides to use the array bucketing mechanism.
    Previously the DevTools front-end had some quite complicated logic in
    place to simulate this via injected JavaScript, but that logic didn't
    pick up internal properties and was also interfering with the inherited
    accessor mechanism. With this new flag, it's straight-forward to
    implement the correct behavior in the DevTools front-end.
    
    The corresponding devtools-frontend CL is https://crrev.com/c/3099011.
    
    Before: https://imgur.com/hMX6vaV.png
    After: https://imgur.com/MGgiuJQ.png
    Bug: chromium:1199701
    Change-Id: Iacbe9756ed8a2e6982efaebe1e7c606d37c05379
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3099686
    Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarPhilip Pfaffe <pfaffe@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#76360}
    ffa4cda6
get-properties.js 6.52 KB