Bug 677864 - Fixes components members class description. r=mrbkap

--HG--
extra : rebase_source : 881d2b170dfbbd75848600a6b723e27bbc5e71e3
This commit is contained in:
arno renevier 2011-08-16 13:57:58 -07:00
parent 2d0c87fb7d
commit 5f4e28b783
3 changed files with 23 additions and 7 deletions

View File

@ -503,7 +503,7 @@ nsXPCComponents_InterfacesByID::GetContractID(char * *aContractID)
NS_IMETHODIMP
nsXPCComponents_InterfacesByID::GetClassDescription(char * *aClassDescription)
{
static const char classDescription[] = "XPCComponents_Interfaces";
static const char classDescription[] = "XPCComponents_InterfacesByID";
*aClassDescription = (char*)nsMemory::Clone(classDescription, sizeof(classDescription));
return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
@ -1075,7 +1075,7 @@ nsXPCComponents_ClassesByID::GetContractID(char * *aContractID)
NS_IMETHODIMP
nsXPCComponents_ClassesByID::GetClassDescription(char * *aClassDescription)
{
static const char classDescription[] = "XPCComponents_Interfaces";
static const char classDescription[] = "XPCComponents_ClassesByID";
*aClassDescription = (char*)nsMemory::Clone(classDescription, sizeof(classDescription));
return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
@ -1346,7 +1346,7 @@ nsXPCComponents_Results::GetContractID(char * *aContractID)
NS_IMETHODIMP
nsXPCComponents_Results::GetClassDescription(char * *aClassDescription)
{
static const char classDescription[] = "XPCComponents_Interfaces";
static const char classDescription[] = "XPCComponents_Results";
*aClassDescription = (char*)nsMemory::Clone(classDescription, sizeof(classDescription));
return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
@ -1575,7 +1575,7 @@ nsXPCComponents_ID::GetContractID(char * *aContractID)
NS_IMETHODIMP
nsXPCComponents_ID::GetClassDescription(char * *aClassDescription)
{
static const char classDescription[] = "XPCComponents_Interfaces";
static const char classDescription[] = "XPCComponents_ID";
*aClassDescription = (char*)nsMemory::Clone(classDescription, sizeof(classDescription));
return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
@ -1803,7 +1803,7 @@ nsXPCComponents_Exception::GetContractID(char * *aContractID)
NS_IMETHODIMP
nsXPCComponents_Exception::GetClassDescription(char * *aClassDescription)
{
static const char classDescription[] = "XPCComponents_Interfaces";
static const char classDescription[] = "XPCComponents_Exception";
*aClassDescription = (char*)nsMemory::Clone(classDescription, sizeof(classDescription));
return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
@ -2098,7 +2098,7 @@ nsXPCConstructor::GetContractID(char * *aContractID)
NS_IMETHODIMP
nsXPCConstructor::GetClassDescription(char * *aClassDescription)
{
static const char classDescription[] = "XPCComponents_Interfaces";
static const char classDescription[] = "XPCConstructor";
*aClassDescription = (char*)nsMemory::Clone(classDescription, sizeof(classDescription));
return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
@ -2364,7 +2364,7 @@ nsXPCComponents_Constructor::GetContractID(char * *aContractID)
NS_IMETHODIMP
nsXPCComponents_Constructor::GetClassDescription(char * *aClassDescription)
{
static const char classDescription[] = "XPCComponents_Interfaces";
static const char classDescription[] = "XPCComponents_Constructor";
*aClassDescription = (char*)nsMemory::Clone(classDescription, sizeof(classDescription));
return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}

View File

@ -0,0 +1,15 @@
function check_cl(iface, desc) {
do_check_eq(iface.QueryInterface(Components.interfaces.nsIClassInfo).classDescription, desc);
}
function run_test() {
check_cl(Components, 'XPCComponents');
check_cl(Components.interfaces, 'XPCComponents_Interfaces');
check_cl(Components.interfacesByID, 'XPCComponents_InterfacesByID');
check_cl(Components.classes, 'XPCComponents_Classes');
check_cl(Components.classesByID, 'XPCComponents_ClassesByID');
check_cl(Components.results, 'XPCComponents_Results');
check_cl(Components.ID, 'XPCComponents_ID');
check_cl(Components.Exception, 'XPCComponents_Exception');
check_cl(Components.Constructor, 'XPCComponents_Constructor');
}

View File

@ -9,6 +9,7 @@ tail =
[test_bug604362.js]
[test_bug608142.js]
[test_bug641378.js]
[test_bug677864.js]
[test_bug_442086.js]
[test_file.js]
[test_import.js]