Make content grab the cached security manager off of nsContentUtils rather than ask the service manager to find one.

Bug 223192; r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@148524 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
caillon%returnzero.com
2003-10-30 03:01:25 +00:00
parent 53f764ca0b
commit e64c44f945
20 changed files with 70 additions and 126 deletions

View File

@@ -57,6 +57,7 @@
#include "nsIDocShellLoadInfo.h"
#include "nsIBaseWindow.h"
#include "nsIWebShell.h"
#include "nsContentUtils.h"
#include "nsIScriptSecurityManager.h"
@@ -182,15 +183,13 @@ nsFrameLoader::LoadFrame()
PromiseFlatCString(doc_charset).get(), base_uri);
NS_ENSURE_SUCCESS(rv, rv);
// Check for security
nsCOMPtr<nsIScriptSecurityManager> secMan =
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
mDocShell->CreateLoadInfo(getter_AddRefs(loadInfo));
NS_ENSURE_TRUE(loadInfo, NS_ERROR_FAILURE);
// Check for security
nsIScriptSecurityManager *secMan = nsContentUtils::GetSecurityManager();
// Get referring URL
nsCOMPtr<nsIURI> referrer;
nsCOMPtr<nsIPrincipal> principal;