On 7/15/14, 6:36 AM, Boris Zbarsky wrote:
That said, I'd think since shape doesn't cover function values events that are the same event type would share the same shape, no?
Oh, wait, this is a getter, not a method. So this probably does mean we're giving each Event instance a unique shape!
That's pretty sucky. We could try to share the getter across instances of a given Event subclass by caching the function somewhere, but it's a bit of a PITA (e.g. we have to cache per-compartment).
It's also not clear to me per spec whether in this case there should be separate getter functions for each instance or not; Web IDL doesn't actually say. This wasn't a problem as long as we only had unforgeable things on effectively singleton objects, but with Event it becomes very much an issue.
-Boris _______________________________________________ dev-tech-js-engine-internals mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

