+5
−8
+1
−1
Loading
This will still prevent them from accessing stuff (.length will be undefined, etc), but seems better than unexpectedly throwing. This fixes the issue at hand at least. With this patch, we reject length accesses here: https://searchfox.org/mozilla-central/rev/86c98c486f03b598d0f80356b69163fd400ec8aa/js/xpconnect/wrappers/XrayWrapper.cpp#229-233 Your call on whether this patch is enough as-is, or more work is needed. Also your call on whether if more work is needed that needs to happen on this bug or somewhere else. I'm not sure what we'd need to do to support this more "properly", presumably we'd need to add special XRay support to ObservableArrayProxyHandler or so? Pointers (or patches of course ;)) welcome. Also unsure about the setter situation, I _think_ it's fine not to throw given the code I read, but please sanity-check. Differential Revision: https://phabricator.services.mozilla.com/D145045