зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
fe29432f2a
Коммит
412f75987b
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче