Closed Bug 1489607 Opened Last year Closed Last year

Make nsXREDirProvider::GetInstallHash consistent with the NSIS CityHash plugin

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: bytesized, Assigned: bytesized)

Details

Attachments

(1 file)

Currently, nsXREDirProvider::GetInstallHash concatenates two halves of the calculated CityHash, but does not 0 pad either of them. This is inconsistent with what the NSIS CityHash plugin does[1].

Currently, this value is only used to generate the update directory, but the function was recently exposed to make it available externally. I would like to make this value consistent with the NSIS CityHash plugin *before* there are any other consumers of this function to prevent any additional migration from being necessary because of this change.

Using this as part of the update directory path *will* require migration, which is already being done as part of Bug 1484846.

[1] https://searchfox.org/mozilla-central/rev/6201a9e0067cf6af118c6a99ae9314b8ceb2c4d5/other-licenses/nsis/Contrib/CityHash/CityHash.cpp#78
Whoops. Copied and pasted the wrong bug number above. The migration is being done in Bug 1458314.
I would like to migrate the update directory to use a version of the hash consistent with what our installer generates as part of the work already being done to migrate the update directory (Bug 1458314).

This patch is a bit of a shim to ensure that no one uses the newly-exposed nsXREDirProvider::GetInstallHash to get the *old* value before Bug 1458314 lands. This way new callers will get a value that is stable, but also consistent with the hash generated by the installer.
Comment on attachment 9007388 [details]
Bug 1489607 - Make nsXREDirProvider::GetInstallHash consistent with the NSIS CityHash plugin r=Mossop

Dave Townsend [:mossop] (he/him) has approved the revision.
Attachment #9007388 - Flags: review+
Pushed by ksteuber@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f21de991bc2a
Make nsXREDirProvider::GetInstallHash consistent with the NSIS CityHash plugin r=mossop
https://hg.mozilla.org/mozilla-central/rev/f21de991bc2a
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.