bug 280613 : checkLoadURIStr of nsIScriptSecurityManager should accept AUTF8String istead of string (for IDN), r=dveditz, sr=darin
git-svn-id: svn://10.0.0.236/trunk@168696 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
9ea9b2da0b
commit
3ad995326c
@ -40,7 +40,8 @@
|
||||
#include "nsIXPCSecurityManager.idl"
|
||||
interface nsIURI;
|
||||
|
||||
[scriptable, uuid(82bff35d-ebb7-4cb9-bb47-4f9ebdf11f77)]
|
||||
|
||||
[scriptable, uuid(463eb1fa-9dac-4ca7-826f-1fc921971d3a)]
|
||||
interface nsIScriptSecurityManager : nsIXPCSecurityManager
|
||||
{
|
||||
///////////////// Security Checks //////////////////
|
||||
@ -118,7 +119,7 @@ interface nsIScriptSecurityManager : nsIXPCSecurityManager
|
||||
* Same as CheckLoadURI but takes string arguments for ease of use
|
||||
* by scripts
|
||||
*/
|
||||
void checkLoadURIStr(in string from, in string uri,
|
||||
void checkLoadURIStr(in AUTF8String from, in AUTF8String uri,
|
||||
in unsigned long flags);
|
||||
|
||||
/**
|
||||
|
||||
@ -1403,17 +1403,16 @@ nsScriptSecurityManager::ReportError(JSContext* cx, const nsAString& messageTag,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScriptSecurityManager::CheckLoadURIStr(const char* aSourceURIStr, const char* aTargetURIStr,
|
||||
nsScriptSecurityManager::CheckLoadURIStr(const nsACString& aSourceURIStr,
|
||||
const nsACString& aTargetURIStr,
|
||||
PRUint32 aFlags)
|
||||
{
|
||||
nsCOMPtr<nsIURI> source;
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(source),
|
||||
nsDependentCString(aSourceURIStr),
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(source), aSourceURIStr,
|
||||
nsnull, nsnull, sIOService);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIURI> target;
|
||||
rv = NS_NewURI(getter_AddRefs(target),
|
||||
nsDependentCString(aTargetURIStr),
|
||||
rv = NS_NewURI(getter_AddRefs(target), aTargetURIStr,
|
||||
nsnull, nsnull, sIOService);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return CheckLoadURI(source, target, aFlags);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user