On Fri Dec 6 10:42:56 2024 +0000, Jacek Caban wrote:
Thanks. This intentionally doesn't touch `PROP_EXTERN`, as deleting those requires interaction with the host object. For all jscript knows, the host may choose to ignore the delete. Fixing accessor and function properties should cover everything prototypes currently need, so those should be in good shape for the code freeze. It could be useful to allow external properties to opt into this delete mechanism for cases where host-owned properties should always behave like regular ones. Examples include `constructor`, `prototype`, and possibly constants like `Node.TEXT_NODE`. For cases like document and window, we might introduce a flag in `property_info` to modify name lookup. Jscript could continue searching the prototype chain and use returned info only if the search fails. Storage properties seem more complicated. None of the solutions that come to mind feel ideal, but this is a very niche corner case. I doubt any reasonable code depends on it, so it seems safe to ignore for now. It also doesn't seem like something Proton needs to worry about.
Well Typed Arrays will need something similar (they override all input indices, and override defineProperty), when I made the first dispex revamp with them, it wasn't clear how it would interact with the host object implementation. Well, it's clear now that we need a way to override them, I guess.
And btw Typed Arrays really need that DISPID optimization as well (or my original hack, which didn't cover enums only) to skip DISPID for every element.