-
Benedikt Meurer authored
When retrieving an API accessor function (i.e. either the getter or the setter) for which the lazy accessor mechanism is used (i.e. where the actual JSFunction is created lazily and only the FunctionTemplateInfo) is around, we thus far created a fresh JSFunction every time the accessor function is requested, but that's observably wrong behavior, since the accessors are JavaScript objects with identity. We currently rely on the instantiation cache to guarantee identity, but there's no reason why we couldn't instead just put the instantiated JSFunction into the AccessorPair. Fixing this to only instantiate the lazy accessor pair only once, upon first time it's requested, coincidentally also simplifies (and fixes) the API accessor breakpoint machinery. This was previously lacking support for walking dictionary prototype objects and forcibly instantiating the lazy accessor pairs with break points. However, all this magic in the debugger is no longer necessary when we ensure that the lazy accessor pair component is generally only instantiated once. Bug: v8:178, v8:7596, chromium:986063, chromium:496666 Change-Id: I41d28378010716c96c8ecf7c3f1247765f8bc669 Fixed: chromium:1163547 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2731527Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#73163}
e9873bf1