Closed Bug 1044083 Opened 10 years ago Closed 4 years ago

Make web-visible XPConnect exceptions SecurityError DOMExceptions

Categories

(Core :: XPConnect, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bholley, Unassigned)

References

Details

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)
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)
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---

We no longer use Xrays for web-facing stuff, and the new cross-origin wrapper machinery from bug 1363208 throws SecurityError DOMExceptions.

Calling this fixed.

Status: REOPENED → RESOLVED
Closed: 6 years ago4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.