Skip to content

Commit

Permalink
[sailfishos][embedlite] Platform info fix for out of memory errors. F…
Browse files Browse the repository at this point in the history
…ixes JB#51363
  • Loading branch information
kende committed Oct 26, 2020
1 parent d158623 commit a86048c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
9 changes: 3 additions & 6 deletions embedding/embedlite/utils/EmbedLiteXulAppInfo.cpp
Expand Up @@ -24,9 +24,6 @@
#include "nsAccessibilityService.h"
#endif

#define xstr(s) str(s)
#define str(s) #s

using namespace mozilla::embedlite;

EmbedLiteXulAppInfo::EmbedLiteXulAppInfo()
Expand All @@ -37,7 +34,7 @@ EmbedLiteXulAppInfo::~EmbedLiteXulAppInfo()
{
}

NS_IMPL_ISUPPORTS(EmbedLiteXulAppInfo, nsIXULRuntime, nsIXULAppInfo)
NS_IMPL_ISUPPORTS(EmbedLiteXulAppInfo, nsIXULRuntime, nsIXULAppInfo, nsIPlatformInfo)

NS_IMETHODIMP EmbedLiteXulAppInfo::GetID(nsACString& aID)
{
Expand All @@ -53,7 +50,7 @@ NS_IMETHODIMP EmbedLiteXulAppInfo::GetVersion(nsACString& aVersion)

NS_IMETHODIMP EmbedLiteXulAppInfo::GetAppBuildID(nsACString& aAppBuildID)
{
aAppBuildID.Assign(xstr(MOZ_BUILDID));
aAppBuildID.Assign(NS_STRINGIFY(MOZ_BUILDID));
return NS_OK;
}

Expand Down Expand Up @@ -83,7 +80,7 @@ NS_IMETHODIMP EmbedLiteXulAppInfo::GetPlatformVersion(nsACString& aPlatformVersi

NS_IMETHODIMP EmbedLiteXulAppInfo::GetPlatformBuildID(nsACString& aPlatformBuildID)
{
aPlatformBuildID.Assign(xstr(MOZ_BUILDID));
aPlatformBuildID.Assign(NS_STRINGIFY(MOZ_BUILDID));
return NS_OK;
}

Expand Down
1 change: 0 additions & 1 deletion embedding/embedlite/utils/EmbedLiteXulAppInfo.h
Expand Up @@ -39,7 +39,6 @@ class EmbedLiteXulAppInfo : public nsIXULAppInfo
{ 0xbf, 0xb2, 0x9f, 0x3b, 0x52, 0x95, 0x6e }}


#define NS_EMBED_LITE_XULAPPINFO_CONTRACTID "@mozilla.org/xre/app-info;1"
#define NS_EMBED_LITE_XULAPPINFO_SERVICE_CLASSNAME "EmbedLite Xul App Info Component"
#define NS_EMBED_LITE_XULAPPINFO_SERVICE_CID NS_IEMBEDLITEXULAPPINFO_IID

Expand Down
4 changes: 3 additions & 1 deletion embedding/embedlite/utils/GeckoLoader.cpp
Expand Up @@ -39,6 +39,7 @@
#include "nsXULAppAPI.h"
#include "EmbedLiteXulAppInfo.h"
#include "mozilla/ModuleUtils.h"
#include "nsXPCOMCIDInternal.h"

#ifdef XP_MACOSX
#include "MacQuirks.h"
Expand Down Expand Up @@ -72,7 +73,8 @@ static const mozilla::Module::CIDEntry kLocalCIDs[] = {
};

static const mozilla::Module::ContractIDEntry kLocalContracts[] = {
{ NS_EMBED_LITE_XULAPPINFO_CONTRACTID, &kNS_EMBED_LITE_XULAPPINFO_SERVICE_CID },
{ XULAPPINFO_SERVICE_CONTRACTID, &kNS_EMBED_LITE_XULAPPINFO_SERVICE_CID },
{ XULRUNTIME_SERVICE_CONTRACTID, &kNS_EMBED_LITE_XULAPPINFO_SERVICE_CID },
{ NULL }
};

Expand Down

0 comments on commit a86048c

Please sign in to comment.