[debug] Always return a valid PropertyDescriptor.
In DebugPropertyIterator::iterator() we were assuming that the call to JSReceiver::GetOwnPropertyDescriptor() would always yield either an exception or a valid property descriptor. But that's not guaranteed to be the case (anymore), because JSReceiver::GetOwnPropertyDescriptor() nowadays can chicken out with `false` for many different reasons. Coincidentally the callsites to DebugPropertyIterator::iterator() are already equipped to handle the case where of an empty property descriptor, which is basically what we get out here. So this CL adjusts the DebugPropertyIterator to return an empty descriptor in this case. Fixed: chromium:1291240 Change-Id: I22a9d0cde2b2c6d3966a85478ed0b87fb4c5d232 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3736445Reviewed-by: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#81458}
Showing
Please
register
or
sign in
to comment