Bug 799152 - nsExpandedPrincipal should use default extendedOrigin/appId/appStatus/isInBrowserElement. r=bholley
authorMounir Lamouri <mounir.lamouri@gmail.com>
Tue, 09 Oct 2012 13:47:46 +0100
changeset 109744 8a20f6ef0df1d312ad024e2bfbfaed432e0ea773
parent 109743 21b01c22ac9e86f3b31f6d0b8b4d6405e042c320
child 109745 13d96461b2da096ef22db98c26f1cf004fcb7922
push id23652
push userryanvm@gmail.com
push dateWed, 10 Oct 2012 01:10:20 +0000
treeherdermozilla-central@5cca0408a73f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs799152
milestone19.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 799152 - nsExpandedPrincipal should use default extendedOrigin/appId/appStatus/isInBrowserElement. r=bholley
caps/src/nsPrincipal.cpp
--- a/caps/src/nsPrincipal.cpp
+++ b/caps/src/nsPrincipal.cpp
@@ -1516,35 +1516,38 @@ nsExpandedPrincipal::GetWhiteList(nsTArr
 {
   *aWhiteList = &mPrincipals;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsExpandedPrincipal::GetExtendedOrigin(nsACString& aExtendedOrigin)
 {
-  return NS_ERROR_NOT_AVAILABLE;
+  return GetOrigin(getter_Copies(aExtendedOrigin));
 }
 
 NS_IMETHODIMP
 nsExpandedPrincipal::GetAppStatus(uint16_t* aAppStatus)
 {
-  return NS_ERROR_NOT_AVAILABLE;
+  *aAppStatus = nsIPrincipal::APP_STATUS_NOT_INSTALLED;
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 nsExpandedPrincipal::GetAppId(uint32_t* aAppId)
 {
-  return NS_ERROR_NOT_AVAILABLE;
+  *aAppId = nsIScriptSecurityManager::NO_APP_ID;
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 nsExpandedPrincipal::GetIsInBrowserElement(bool* aIsInBrowserElement)
 {
-  return NS_ERROR_NOT_AVAILABLE;
+  *aIsInBrowserElement = false;
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 nsExpandedPrincipal::GetUnknownAppId(bool* aUnknownAppId)
 {
   *aUnknownAppId = false;
   return NS_OK;
 }