Bug 451081 - Add flag to protocol handler to distinguish that trust domain is the whole spec, r=mbanner
authorHonza Bambas <honzab.moz@firemni.cz>
Mon, 08 Aug 2011 14:38:44 +0200
changeset 8255 3ffc5d736389ccbfa4b4b62b5534e1cc6aa4b333
parent 8254 f80dd2316fcbfb445bb95453b454992951af0dfe
child 8256 0a791b412d030b38b3fa5a9dc8d9165b49719ebd
push id6348
push userhonzab.moz@firemni.cz
push dateMon, 08 Aug 2011 12:39:36 +0000
treeherdercomm-central@3ffc5d736389 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbanner
bugs451081
Bug 451081 - Add flag to protocol handler to distinguish that trust domain is the whole spec, r=mbanner
mailnews/imap/src/nsImapService.cpp
mailnews/local/src/nsMailboxService.cpp
mailnews/news/src/nsNntpService.cpp
--- a/mailnews/imap/src/nsImapService.cpp
+++ b/mailnews/imap/src/nsImapService.cpp
@@ -2438,17 +2438,21 @@ NS_IMETHODIMP nsImapService::GetDefaultP
   NS_ENSURE_ARG_POINTER(aDefaultPort);
   *aDefaultPort = nsIImapUrl::DEFAULT_IMAP_PORT;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::GetProtocolFlags(PRUint32 *result)
 {
   *result = URI_STD | URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT |
-  URI_DANGEROUS_TO_LOAD | ALLOWS_PROXY;
+  URI_DANGEROUS_TO_LOAD | ALLOWS_PROXY
+#ifdef IS_ORIGIN_IS_FULL_SPEC_DEFINED
+  | ORIGIN_IS_FULL_SPEC
+#endif
+  ;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::AllowPort(PRInt32 port, const char *scheme, PRBool *aRetVal)
 {
   // allow imap to run on any port
   *aRetVal = PR_TRUE;
   return NS_OK;
--- a/mailnews/local/src/nsMailboxService.cpp
+++ b/mailnews/local/src/nsMailboxService.cpp
@@ -533,17 +533,21 @@ NS_IMETHODIMP nsMailboxService::AllowPor
   *_retval = PR_FALSE;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailboxService::GetProtocolFlags(PRUint32 *result)
 {
   NS_ENSURE_ARG_POINTER(result);
   *result = URI_STD | URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT |
-            URI_DANGEROUS_TO_LOAD;
+            URI_DANGEROUS_TO_LOAD
+#ifdef IS_ORIGIN_IS_FULL_SPEC_DEFINED
+            | ORIGIN_IS_FULL_SPEC
+#endif
+  ;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailboxService::NewURI(const nsACString &aSpec,
                                        const char *aOriginCharset,
                                        nsIURI *aBaseURI,
                                        nsIURI **_retval)
 {
--- a/mailnews/news/src/nsNntpService.cpp
+++ b/mailnews/news/src/nsNntpService.cpp
@@ -1303,17 +1303,22 @@ nsNntpService::GetDefaultServerPort(PRBo
 
     return rv;
 }
 
 NS_IMETHODIMP nsNntpService::GetProtocolFlags(PRUint32 *aUritype)
 {
     NS_ENSURE_ARG_POINTER(aUritype);
     *aUritype = URI_NORELATIVE | URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT |
-      URI_LOADABLE_BY_ANYONE | ALLOWS_PROXY;
+      URI_LOADABLE_BY_ANYONE | ALLOWS_PROXY
+#ifdef IS_ORIGIN_IS_FULL_SPEC_DEFINED
+      | ORIGIN_IS_FULL_SPEC
+#endif
+    ;
+  
     return NS_OK;
 }
 
 NS_IMETHODIMP nsNntpService::NewURI(const nsACString &aSpec,
                                     const char *aCharset, // ignored
                                     nsIURI *aBaseURI,
                                     nsIURI **_retval)
 {