Bug 1518991 - Make nsIPrincipal URI getter infallible; r=bholley
authorKyle Machulis <kyle@nonpolynomial.com>
Thu, 10 Jan 2019 05:44:33 +0000
changeset 510309 4e654e9222bd7d2e16ab62bd3d3441059b25d0c8
parent 510308 463d00cf41fdc9baf09ab663c55e680ec3dce6b6
child 510310 74bb778f78793e82cfcae11446387795cb4d4180
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1518991
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1518991 - Make nsIPrincipal URI getter infallible; r=bholley nsIPrincipal::GetURI returns NS_OK for all implementations. Make it infallible so we can clean up status checks in C++ code that uses principals. Differential Revision: https://phabricator.services.mozilla.com/D16145
caps/nsIPrincipal.idl
--- a/caps/nsIPrincipal.idl
+++ b/caps/nsIPrincipal.idl
@@ -70,17 +70,17 @@ interface nsIPrincipal : nsISerializable
      * Returns a hash value for the principal.
      */
     [notxpcom, nostdcall] readonly attribute unsigned long hashValue;
 
     /**
      * The codebase URI to which this principal pertains.  This is
      * generally the document URI.
      */
-    readonly attribute nsIURI URI;
+    [infallible] readonly attribute nsIURI URI;
 
     /**
      * The domain URI to which this principal pertains.
      * This is null unless script successfully sets document.domain to our URI
      * or a superdomain of our URI.
      * Setting this has no effect on the URI.
      * See https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Changing_origin
      */