[tbb-commits] [tor-browser/tor-browser-60.1.0esr-8.0-1] squash! Bug 4234: Use the Firefox Update Process for Tor Browser.

gk at torproject.org gk at torproject.org
Wed Aug 29 21:05:50 UTC 2018


commit 7b269d1c44ba383444a1bfed3acb67ab3cac5071
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Wed Aug 22 13:51:29 2018 -0400

    squash! Bug 4234: Use the Firefox Update Process for Tor Browser.
    
    Also fix bug 27221: purge the startup cache if the Tor Browser
    version changed (even if the Firefox version and build ID did
    not change), e.g., after a minor Tor Browser update.
---
 toolkit/xre/nsAppRunner.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index d036bc915c80..1000014aedd0 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3208,6 +3208,13 @@ CheckCompatibility(nsIFile* aProfileDir, const nsCString& aVersion,
   if (NS_FAILED(rv) || !aVersion.Equals(buf))
     return false;
 
+#ifdef TOR_BROWSER_VERSION
+  nsAutoCString tbVersion(TOR_BROWSER_VERSION);
+  rv = parser.GetString("Compatibility", "LastTorBrowserVersion", buf);
+  if (NS_FAILED(rv) || !tbVersion.Equals(buf))
+    return false;
+#endif
+
   rv = parser.GetString("Compatibility", "LastOSABI", buf);
   if (NS_FAILED(rv) || !aOSABI.Equals(buf))
     return false;
@@ -3304,6 +3311,13 @@ WriteVersion(nsIFile* aProfileDir, const nsCString& aVersion,
   PR_Write(fd, kHeader, sizeof(kHeader) - 1);
   PR_Write(fd, aVersion.get(), aVersion.Length());
 
+#ifdef TOR_BROWSER_VERSION
+  nsAutoCString tbVersion(TOR_BROWSER_VERSION);
+  static const char kTorBrowserVersionHeader[] = NS_LINEBREAK "LastTorBrowserVersion=";
+  PR_Write(fd, kTorBrowserVersionHeader, sizeof(kTorBrowserVersionHeader) - 1);
+  PR_Write(fd, tbVersion.get(), tbVersion.Length());
+#endif
+
   static const char kOSABIHeader[] = NS_LINEBREAK "LastOSABI=";
   PR_Write(fd, kOSABIHeader, sizeof(kOSABIHeader) - 1);
   PR_Write(fd, aOSABI.get(), aOSABI.Length());



More information about the tbb-commits mailing list