-
Toon Verwaest authored
The optimization was initially designed to support only the case where the receiver is the holder, so make this explicit: Cached properties were implemented before super property access and Reflect.get, or at least around the same time, not realising it conflicted. Cached properties are optimizations for known accessors globalThis.window and globalThis.document. They store the result of calling those accessors. The result of calling those accessors depends on the receiver passed to the call, so we shouldn't simply read the cached property off of the _holder_ of the accessor, but only do so if the holder is the same as the receiver. Bug: chromium:1305302 Change-Id: Iea6f4437e09d5a293798041adcb310469589d00f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3738744Reviewed-by: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#81498}
078f3fb4