Closed Bug 1518991 Opened 2 years ago Closed 2 years ago

Make nsIPrincipal URI getter infallible

Categories

(Core :: Security: CAPS, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: qdot, Assigned: qdot)

References

Details

Attachments

(1 file)

Getting a URI from a principal is an infallible operation. We may get back a nullptr, but the getter always returns NS_OK. We could clean up some C++ code by removing the success checks.

nsIPrincipal::GetURI returns NS_OK for all implementations. Make it
infallible so we can clean up status checks in C++ code that uses principals.
Pushed by kmachulis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e654e9222bd
Make nsIPrincipal URI getter infallible; r=bholley
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.