Re-land patch for bug 83536, merging principal objects.

Also includes fixes from bug 216041.
r=bzbarsky
sr=jst


git-svn-id: svn://10.0.0.236/trunk@148229 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
caillon%returnzero.com
2003-10-21 22:11:49 +00:00
parent 39817850bd
commit c1914505cb
72 changed files with 1081 additions and 3101 deletions

View File

@@ -99,8 +99,6 @@
#include "nsIDOMWindowInternal.h"
#include "nsIChannel.h"
#include "nsIPrincipal.h"
#include "nsIAggregatePrincipal.h"
#include "nsICodebasePrincipal.h"
#include "nsXBLAtoms.h"
#include "nsXMLPrettyPrinter.h"
@@ -718,6 +716,7 @@ nsXMLContentSink::ProcessBASETag(nsIContent* aContent)
}
}
}
return rv;
}

View File

@@ -76,9 +76,8 @@
#include "nsICharsetAlias.h"
#include "nsNetUtil.h"
#include "nsDOMError.h"
#include "nsScriptSecurityManager.h"
#include "nsIScriptSecurityManager.h"
#include "nsIPrincipal.h"
#include "nsIAggregatePrincipal.h"
#include "nsLayoutCID.h"
#include "nsDOMAttribute.h"
#include "nsGUIEvent.h"
@@ -332,21 +331,7 @@ nsXMLDocument::OnRedirect(nsIHttpChannel *aHttpChannel, nsIChannel *aNewChannel)
return rv;
}
nsCOMPtr<nsIPrincipal> newCodebase;
rv = secMan->GetCodebasePrincipal(newLocation,
getter_AddRefs(newCodebase));
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;
nsCOMPtr<nsIAggregatePrincipal> agg = do_QueryInterface(mPrincipal, &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "Principal not an aggregate.");
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;
rv = agg->SetCodebase(newCodebase);
return rv;
return secMan->GetCodebasePrincipal(newLocation, getter_AddRefs(mPrincipal));
}
NS_IMETHODIMP