Fix for bug 306363 (Clean up nsContentUtils service getters). r/sr=bz.

git-svn-id: svn://10.0.0.236/trunk@179982 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%propagandism.org
2005-09-11 10:08:43 +00:00
parent 8f39da2e1d
commit b64b04886f
45 changed files with 151 additions and 198 deletions

View File

@@ -1855,7 +1855,7 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
}
nsCOMPtr<nsIPrincipal> callerPrincipal;
nsContentUtils::GetSecurityManager()->
nsContentUtils::SecurityManager()->
GetSubjectPrincipal(getter_AddRefs(callerPrincipal));
// The URI for the document after this call. Get it from the calling
@@ -2245,7 +2245,7 @@ nsHTMLDocument::ScriptWriteCommon(PRBool aNewlineTerminate)
// document for security purposes. Thus a document.write of a script tag
// ends up producing a script with the same principals as the script
// that performed the write.
nsIScriptSecurityManager *secMan = nsContentUtils::GetSecurityManager();
nsIScriptSecurityManager *secMan = nsContentUtils::SecurityManager();
nsCOMPtr<nsIPrincipal> subject;
rv = secMan->GetSubjectPrincipal(getter_AddRefs(subject));
@@ -3544,8 +3544,8 @@ nsHTMLDocument::SetDesignMode(const nsAString & aDesignMode)
if (!url.Equals("about:blank")) {
// If we're 'about:blank' then we don't care who can edit us.
// If we're not about:blank, then we need to check sameOrigin.
rv = nsContentUtils::GetSecurityManager()->CheckSameOrigin(nsnull,
mDocumentURI);
rv = nsContentUtils::SecurityManager()->CheckSameOrigin(nsnull,
mDocumentURI);
if (NS_FAILED(rv))
return rv;
}
@@ -3818,8 +3818,7 @@ nsHTMLDocument::DoClipboardSecurityCheck(PRBool aPaste)
NS_NAMED_LITERAL_CSTRING(classNameStr, "Clipboard");
nsIScriptSecurityManager *secMan =
nsContentUtils::GetSecurityManager();
nsIScriptSecurityManager *secMan = nsContentUtils::SecurityManager();
if (aPaste) {
if (nsHTMLDocument::sPasteInternal_id == JSVAL_VOID) {