diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-05-07 17:26:17 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-05-07 17:26:17 -0500 |
commit | 2d42120dfce04f2984b7ca719c659cc3cb1af14b (patch) | |
tree | 85670f2f6d53b673c14453769120c2d301c6642a /xpcom | |
parent | a7c286677036445e571c914e3b94e16747904835 (diff) | |
download | aura-central-2d42120dfce04f2984b7ca719c659cc3cb1af14b.tar.gz |
Issue #23 - Hardcode platformVersion to 52.9 and introduce runtimeVersion with the real version.
Diffstat (limited to 'xpcom')
-rw-r--r-- | xpcom/components/ManifestParser.cpp | 10 | ||||
-rw-r--r-- | xpcom/system/nsIPlatformInfo.idl | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp index 8d94a1545..e8e7a4467 100644 --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp @@ -465,6 +465,7 @@ ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired"); NS_NAMED_LITERAL_STRING(kApplication, "application"); NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); + NS_NAMED_LITERAL_STRING(kRuntimeVersion, "runtimeversion"); NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); NS_NAMED_LITERAL_STRING(kOs, "os"); NS_NAMED_LITERAL_STRING(kOsVersion, "osversion"); @@ -479,6 +480,7 @@ ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, nsAutoString appID; nsAutoString appVersion; + nsAutoString runtimeVersion; nsAutoString geckoVersion; nsAutoString osTarget; nsAutoString abi; @@ -502,6 +504,11 @@ ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, CopyUTF8toUTF16(s, appVersion); } + rv = xapp->GetRuntimeVersion(s); + if (NS_SUCCEEDED(rv)) { + CopyUTF8toUTF16(s, runtimeVersion); + } + rv = xapp->GetPlatformVersion(s); if (NS_SUCCEEDED(rv)) { CopyUTF8toUTF16(s, geckoVersion); @@ -634,6 +641,7 @@ ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, bool ok = true; TriState stAppVersion = eUnspecified; + TriState stRuntimeVersion = eUnspecified; TriState stGeckoVersion = eUnspecified; TriState stApp = eUnspecified; TriState stOsVersion = eUnspecified; @@ -654,6 +662,7 @@ ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, CheckStringFlag(kProcess, wtoken, process, stProcess) || CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || + CheckVersionFlag(kRuntimeVersion, wtoken, runtimeVersion, stRuntimeVersion) || CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) { continue; } @@ -699,6 +708,7 @@ ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf, if (!ok || stApp == eBad || stAppVersion == eBad || + stRuntimeVersion == eBad || stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad || diff --git a/xpcom/system/nsIPlatformInfo.idl b/xpcom/system/nsIPlatformInfo.idl index fba78b6ec..086a86594 100644 --- a/xpcom/system/nsIPlatformInfo.idl +++ b/xpcom/system/nsIPlatformInfo.idl @@ -4,11 +4,17 @@ #include "nsISupports.idl" -[scriptable, uuid(ab6650cf-0806-4aea-b8f2-40fdae74f1cc)] +[scriptable, uuid(4700f5a9-0a54-4ba7-8642-5410eca17785)] interface nsIPlatformInfo : nsISupports { /** - * The version of the XULRunner platform. + * The TRUE version of the runtime. + */ + readonly attribute ACString runtimeVersion; + + /** + * Deprecated: The version of the XULRunner platform. + * Always returns "52.9.0" */ readonly attribute ACString platformVersion; |