зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1273020 - add more assertions, r=njn
This commit is contained in:
Родитель
429347899e
Коммит
db0f2224b6
|
@ -27,6 +27,7 @@ ApplicationAccessible::ApplicationAccessible() :
|
|||
{
|
||||
mType = eApplicationType;
|
||||
mAppInfo = do_GetService("@mozilla.org/xre/app-info;1");
|
||||
MOZ_ASSERT(mAppInfo, "no application info");
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(ApplicationAccessible, Accessible)
|
||||
|
|
|
@ -60,6 +60,8 @@ public:
|
|||
|
||||
void AppName(nsAString& aName) const
|
||||
{
|
||||
MOZ_ASSERT(mAppInfo, "no application info");
|
||||
|
||||
if (mAppInfo) {
|
||||
nsAutoCString cname;
|
||||
mAppInfo->GetName(cname);
|
||||
|
@ -69,6 +71,8 @@ public:
|
|||
|
||||
void AppVersion(nsAString& aVersion) const
|
||||
{
|
||||
MOZ_ASSERT(mAppInfo, "no application info");
|
||||
|
||||
if (mAppInfo) {
|
||||
nsAutoCString cversion;
|
||||
mAppInfo->GetVersion(cversion);
|
||||
|
@ -83,6 +87,8 @@ public:
|
|||
|
||||
void PlatformVersion(nsAString& aVersion) const
|
||||
{
|
||||
MOZ_ASSERT(mAppInfo, "no application info");
|
||||
|
||||
if (mAppInfo) {
|
||||
nsAutoCString cversion;
|
||||
mAppInfo->GetPlatformVersion(cversion);
|
||||
|
|
Загрузка…
Ссылка в новой задаче