Closed Bug 1621116 Opened 5 months ago Closed 4 months ago

Cache the last application version from compatibility.ini

Categories

(Toolkit :: Startup and Profile System, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: mossop, Assigned: mossop)

References

Details

Crash Data

Attachments

(1 file)

In a couple of places we track the last application version that ran with this profile in order to decide whether to do additional work. I know of Normandy and the add-ons manager at least doing this in preferences.

We already have the last application version info in compatibility.ini, it is straightforward to read it and make it available on nsIXULRuntime.

We cache this information in compatibility.ini so we can just expose it on
nsIXULRuntime.

Note that bug 1588113 will be changing exactly how this is called.

Attachment #9132061 - Attachment description: Bug 1621116: Make the version and build ID of the previous instance of Firefox to use the current profile available. → Bug 1621116: Make the version and build ID of the previous instance of Firefox to use the current profile available. r=froydnj!
Pushed by dtownsend@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/42851810d9e9
Make the version and build ID of the previous instance of Firefox to use the current profile available. r=froydnj
Backout by dvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8eff2c0a4ada
Backed out changeset 42851810d9e9 on request from the dev
Pushed by dtownsend@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/86a23ca27412
Make the version and build ID of the previous instance of Firefox to use the current profile available. r=froydnj
Pushed by dtownsend@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8480828de5a6
Make the version and build ID of the previous instance of Firefox to use the current profile available. r=froydnj

I guess because these strings are static and so still allocated at shutdown they're being considered as leaks. What is the preferred way to handle this, should I add something to the shutdown path to clear them?

Flags: needinfo?(dtownsend) → needinfo?(nfroyd)
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/68e481a7ae7d
Backed out changeset 8480828de5a6 for mda1 OSX permafailure CLOSED TREE

(In reply to Dave Townsend [:mossop] (he/him) from comment #8)

I guess because these strings are static and so still allocated at shutdown they're being considered as leaks. What is the preferred way to handle this, should I add something to the shutdown path to clear them?

Ugh. That's really annoying. I guess we have to find a convenient place for them, though now I'm worried about things asking for them during shutdown somewhere. I guess we could reset them off a suitable observer topic, and hard assert if somebody accesses them while they're reset?

Flags: needinfo?(nfroyd)

(In reply to Nathan Froyd [:froydnj] from comment #10)

(In reply to Dave Townsend [:mossop] (he/him) from comment #8)

I guess because these strings are static and so still allocated at shutdown they're being considered as leaks. What is the preferred way to handle this, should I add something to the shutdown path to clear them?

Ugh. That's really annoying. I guess we have to find a convenient place for them, though now I'm worried about things asking for them during shutdown somewhere. I guess we could reset them off a suitable observer topic, and hard assert if somebody accesses them while they're reset?

So I think after this https://searchfox.org/mozilla-central/rev/b712398b7fae54ef377a558d6f16dede7a7f8530/toolkit/xre/nsAppRunner.cpp#4766 XPCOM is shutdown and we synchronously exit from main afterwards so it should be impossible for anything else to access it. So I'll clear them there I guess.

Crash Signature: [@ CompareCompatVersions(nsTSubstring<char> const&, nsTSubstring<char> const&)]
Attachment #9132061 - Attachment description: Bug 1621116: Make the version and build ID of the previous instance of Firefox to use the current profile available. r=froydnj! → Bug 1621116: Make the version and build ID of the previous instance of Firefox to use the current profile available. r=glandium!
Pushed by dtownsend@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/42e5e7356e40
Make the version and build ID of the previous instance of Firefox to use the current profile available. r=froydnj,glandium
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.