fix the XPCOM out-param memory ownership issue of bug 60304 "Basic Auth
doesn't work for Java" patch = joshua.xia; r = jst; sr = darin git-svn-id: svn://10.0.0.236/trunk@140543 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
|
||||
%}
|
||||
|
||||
[ptr] native const_char_ptr(const char);
|
||||
|
||||
[noscript, uuid(078a1b99-6be2-4a57-a749-378f4a506097)]
|
||||
interface nsIAuthenticationInfo : nsISupports
|
||||
@@ -42,8 +43,8 @@ interface nsIAuthenticationInfo : nsISupports
|
||||
* AuthenticationInfo (username/password pair)
|
||||
*/
|
||||
|
||||
readonly attribute string username;
|
||||
readonly attribute string password;
|
||||
readonly attribute const_char_ptr username;
|
||||
readonly attribute const_char_ptr password;
|
||||
};
|
||||
|
||||
[noscript, uuid(82274a32-a196-42ee-8e3b-fcb73e339518)]
|
||||
|
||||
@@ -66,14 +66,14 @@ nsAuthenticationInfoImp::~nsAuthenticationInfoImp()
|
||||
}
|
||||
|
||||
/* readonly attribute string username; */
|
||||
NS_IMETHODIMP nsAuthenticationInfoImp::GetUsername(char * *aUsername)
|
||||
NS_IMETHODIMP nsAuthenticationInfoImp::GetUsername(const char * *aUsername)
|
||||
{
|
||||
*aUsername = mUserName;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* readonly attribute string password; */
|
||||
NS_IMETHODIMP nsAuthenticationInfoImp::GetPassword(char * *aPassword)
|
||||
NS_IMETHODIMP nsAuthenticationInfoImp::GetPassword(const char * *aPassword)
|
||||
{
|
||||
*aPassword = mPassWord;
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user