[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #27221 [Applications/Tor Browser]: Tor Browser 8.0a10 wants to update to 8.0a10
#27221: Tor Browser 8.0a10 wants to update to 8.0a10
--------------------------------------------+--------------------------
Reporter: boklm | Owner: tbb-team
Type: defect | Status: new
Priority: Very High | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: ff60-esr, TorBrowserTeam201808 | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------------------------+--------------------------
Comment (by mcs):
Replying to [comment:14 boklm]:
> In `startup()` in `toolkit/mozapps/extensions/internal/XPIProvider.jsm`,
it seems that a `startupcache-invalidate` notification is sent if
`flushCaches` is true:
> {{{
> let flushCaches = this.checkForChanges(aAppChanged, aOldAppVersion,
> aOldPlatformVersion);
> }}}
>
> And it seems that it is looking at the `AppVersion` and
`PlatformVersion` to decide that.
>
> I see that the prefs `extensions.lastAppVersion` and
`extensions.lastPlatformVersion` are both set to `60.1.0`, which didn't
change between `8.0a9` and `8.0a10`.
Replying to [comment:14 boklm]:
> In `startup()` in `toolkit/mozapps/extensions/internal/XPIProvider.jsm`,
it seems that a `startupcache-invalidate` notification is sent if
`flushCaches` is true:
> {{{
> let flushCaches = this.checkForChanges(aAppChanged, aOldAppVersion,
> aOldPlatformVersion);
> }}}
>
> And it seems that it is looking at the `AppVersion` and
`PlatformVersion` to decide that.
>
> I see that the prefs `extensions.lastAppVersion` and
`extensions.lastPlatformVersion` are both set to `60.1.0`, which didn't
change between `8.0a9` and `8.0a10`.
Thanks for tracking that down! A few things are starting to come back to
Kathy and me. Inside the `startup()` function within `XPIProvider.jsm`,
`aAppChanged` should be `true` because we added code to
`toolkit/mozapps/extensions/AddonManager.jsm` that checks the Tor Browser
version against the `extensions.lastTorBrowserVersion` pref:
{{{
#ifdef TOR_BROWSER_VERSION
// To ensure that extension override prefs are reinstalled into the
// user's profile after each update, set appChanged = true if the
// Mozilla app version has not changed but the Tor Browser version
// has changed.
let tbChanged = undefined;
try {
tbChanged = TOR_BROWSER_VERSION !=
Services.prefs.getCharPref(PREF_EM_LAST_TORBROWSER_VERSION);
}
catch (e) { }
if (tbChanged !== false) {
// Because PREF_EM_LAST_TORBROWSER_VERSION was not present in
older
// versions of Tor Browser, an app change is indicated when
tbChanged
// is undefined or true.
if (appChanged === false) {
appChanged = true;
}
Services.prefs.setCharPref(PREF_EM_LAST_TORBROWSER_VERSION,
TOR_BROWSER_VERSION);
}
#endif
}}}
Alas, due to the script cache the old 8.0a9 `AddonManager.jsm` code is
still running after the update to 8.0a10. I am going to try sending email
to Kris Maglione from Mozilla to see if there is some other trick that
causes the script cache to be invalidated. But I believe that Firefox
won't encounter this problem because they are testing against the app
version valued returned by `Services.appinfo.version` which is implemented
in C++ (therefore the JS script cache won't interfere).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27221#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs