With Eddy's refactoring of the wrapper hierarchy over in bug 703537, there are now two types of wrappers: IndirectWrappers, which implement derived traps in terms of fundamental traps, and DirectWrappers, which forward everything explicitly. Currently, CrossCompartmentWrapper inherits DirectWrapper, but it would be nice to have the other one too.
Templatizing turned out to be the wrong way to go, because it meant that we'd do the cross-compartment wrapper goop twice for a single call when going through the derived traps. I've got a different strategy now.
Summary: Templatize CrossCompartmentWrapper → Implement IndirectCrossCompartmentWrapper
Created attachment 638673 [details] [diff] [review] Introduce IndirectCrossCompartmentWrapper. v1 So, I've got this written. Unfortunately, I discovered that AbstractWrapper semantics aren't really useful when wrapping arrays, because PropertyOp-implemented things like .length don't work right with getPropertyDescriptor. So we rely on the special get() behavior that calls getGeneric() to do the right thing. Lame. Hopefully someday we'll fix the whole PropertyOp mess. In the mean time though, this patch isn't useful to me. Posting it here for posterity.
Indirect wrappers are going away in bug 803068.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.