Make web-visible XPConnect exceptions SecurityError DOMExceptions




4 years ago
2 years ago


(Reporter: bholley, Unassigned)


Firefox Tracking Flags

(Not tracked)




4 years ago
See bug 965898 comment 25. We need to do this at some point, but it might require various refactorings, so I'm splitting this out of that bug.
So the big problem is that these exceptions are thrown from Proxy.cpp, which has no knowledge of DOMException, right?  If we could just move these into Gecko code, this would be trivial.

Most simply, could we push the throwing down into the actual handler involved, which I assume is in Gecko code?
Flags: needinfo?(bobbyholley)

Comment 2

2 years ago
I think we should make the error reporting operate with a virtual trap on BaseProxyHandler with a default implementation that does what the Proxy.cpp stuff does now. We can then override that in CrossOriginXrayWrapper to give ourselves proper DOM semantics. We could also optionally override it in FilteringWrapper and XrayWrapper if we wanted that to be exposed to the other (non-Web) cases as well.
Flags: needinfo?(bobbyholley)
You need to log in before you can comment on or make changes to this bug.