Bug 752529 - workers shouldn't use string origins as null principals don't have them. Part 1 - nsPrincipal IDL changes (r=bz)
authorIan Melven <imelven@mozilla.com>
Tue, 08 Jan 2013 13:53:29 -0800
changeset 118146 3225d581951ed0ca9fdb22da9f6f15488ee4d727
parent 118145 ae69e98751c564b3ec7c7474e603b61412debb71
child 118147 752a9a829df27ecad36c6588e058e25e70b77741
push id20872
push userimelven@mozilla.com
push dateTue, 08 Jan 2013 21:56:42 +0000
treeherdermozilla-inbound@752a9a829df2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs752529
milestone21.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 752529 - workers shouldn't use string origins as null principals don't have them. Part 1 - nsPrincipal IDL changes (r=bz)
caps/idl/nsIPrincipal.idl
--- a/caps/idl/nsIPrincipal.idl
+++ b/caps/idl/nsIPrincipal.idl
@@ -16,17 +16,17 @@ struct JSPrincipals;
 
 interface nsIURI;
 interface nsIContentSecurityPolicy;
 
 [ptr] native JSContext(JSContext);
 [ptr] native JSPrincipals(JSPrincipals);
 [ptr] native PrincipalArray(nsTArray<nsCOMPtr<nsIPrincipal> >);
 
-[scriptable, builtinclass, uuid(011966C0-8564-438D-B37A-08D7E1195E5A)]
+[scriptable, builtinclass, uuid(dbda8bb0-3023-4aec-ad98-8e9931a29d70)]
 interface nsIPrincipal : nsISerializable
 {
     /**
      * Returns whether the other principal is equivalent to this principal.
      * Principals are considered equal if they are the same principal, or
      * they have the same origin.
      */
     boolean equals(in nsIPrincipal other);
@@ -148,16 +148,23 @@ interface nsIPrincipal : nsISerializable
      * Some principals will assert if you try to access the extendedOrigin.
      *
      * The extendedOrigin is intended to be an opaque identifier. It is
      * currently "human-readable" but no callers should assume it will stay
      * as is and it might be crypto-hashed at some point.
      */
     readonly attribute AUTF8String extendedOrigin;
 
+    /**
+     * The base domain of the codebase URI to which this principal pertains
+     * (generally the document URI), handling null principals and
+     * non-hierarchical schemes correctly.
+     */
+    readonly attribute ACString baseDomain;
+    
     const short APP_STATUS_NOT_INSTALLED = 0;
     const short APP_STATUS_INSTALLED     = 1;
     const short APP_STATUS_PRIVILEGED    = 2;
     const short APP_STATUS_CERTIFIED     = 3;
 
     /**
      * Gets the principal's app status, which indicates whether the principal
      * corresponds to "app code", and if it does, how privileged that code is.