From that diff it looks to me that if ~/.mozilla exists OR if MOZ_LEGACY_HOME is set it uses ~/.mozilla, otherwise it uses the $XDG_CONFIG_HOME/.mozilla directory instead.
So no migration to the XDG directory, but also no throwing away your existing data either.
I know a few apps that did the same (mpv for example). If you still have it in home root it uses that, when you move it to .config it uses that instead. Auto migrating could and would create issues.
It seems Firefox doesn't really rely on these. My profile directory has been around for more than a decade, went through three computers and even between Windows and Linux and from plain Firefox to Firefox Developer Edition and pretty much everything transferred just by copying the files around (however i didn't copy the full Mozilla directory, first i let Firefox make a new empty profile by itself and copy/pasted the files in it, overwriting whatever was already there).
It even had the original XUL-based DownThemAll version, got disabled after XUL addons were disabled and some time one or two years later it got re-enabled again after the dev released a webextensions compatible version (sadly with several limitations, but still useful for bulk downloads).
Amusingly, there are a couple Windows absolute paths in there even though this profile has been on Linux for a few years now :-P
Interesting. I have had extensions lose their storage when the profile directory path changed, and at the time it seemed to be because of the pathnames within the files.
This is very important to know if this is really the case. And if it is, then what is the best way to migrate? Is there an official, supported method if "mv" is not it?
There is an answer in the comment to the original bug:
> there is no migration path supported at this point: only new profiles are expected to use the new setup. Migrating manually is at your own risk, make a backup before.
I'll try to do it manually, replacing paths in the couple of files mentioned above first.
I hate to say it, but if there's no migration path, this improvement may not have been the best use of Mozilla's resources. Because who's creating new Firefox accounts in 2025? I mean I guess the folder will be in the right place the next time I do a fresh install, but I'd rather see them investing in stuff that grows their user base.
So no migration to the XDG directory, but also no throwing away your existing data either.