gecko-dev/browser/components/migration
Dave Townsend 00de7dca50 Bug 1541804: Make profile refresh for non-ascii named profiles work correctly. r=Gijs
This fixes two bugs. The first is that when the firefox profile migrator doesn't
know which profile to migrate it attempts to fall back to another profile. I
think this was intended to be the default but in bug 1322797 I ended up making
it the current profile, which is the profile we're restoring into now. I think
at this stage the profile directory doesn't even exist so things go wrong.
Changing to use the actual default works but....

When the profile migrator UI doesn't know what profile to migrate from it uses
the default profile. So if the profile you're actually trying to restore is not
the default we'll effectively throw its data into the archive and replace it
with data from the default profile. I'm inclined to say that if the migrator
does not know what profile to migrate from it should error at that point for
safety.

Why would the profile migrator not know what profile to migrate from? Because of
a long-standing text encoding problem. In C++ profile names are encoded in UTF8.
But we try to pass them to JS through an IDL parameter of type ACString. This
does no UTF8 decoding and so JS recieves an incorrect name if the name includes
non-ascii characters and so can't find the profile.

This patch fixes the IDL parameter to AUTF8String which does the decoding
correctly and so JS gets the name correctly.

We should probably think about whether just passing the nsIToolkitProfile object
to the migrator is a better choice here.

Differential Revision: https://phabricator.services.mozilla.com/D26250

--HG--
extra : moz-landing-system : lando
2019-04-04 21:53:01 +00:00
..
content Bug 1498569, Replace wizard.xml attributes with event listeners, r=Gijs 2019-04-02 08:56:25 +00:00
tests Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-31 15:12:55 +00:00
.eslintrc.js Bug 1415265 - Implement a central configuration for setting ESLint environments for test directories. r=mossop 2019-03-28 09:38:02 +00:00
360seProfileMigrator.jsm Bug 1524688: Part 6 - Convert profile migrators to static registration r=MattN 2019-01-29 18:20:19 -08:00
ChromeMigrationUtils.jsm Bug 1520808 - Allow importing of history from Chrome even if it was created in the future. r=mak 2019-01-29 12:06:05 +00:00
ChromeProfileMigrator.jsm Bug 1524688: Part 6 - Convert profile migrators to static registration r=MattN 2019-01-29 18:20:19 -08:00
ESEDBReader.jsm Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
EdgeProfileMigrator.jsm Bug 1524688: Part 6 - Convert profile migrators to static registration r=MattN 2019-01-29 18:20:19 -08:00
FirefoxProfileMigrator.jsm Bug 1541804: Make profile refresh for non-ascii named profiles work correctly. r=Gijs 2019-04-04 21:53:01 +00:00
IEProfileMigrator.jsm Bug 1529495 - Remove unused third argument to OSCrypto.decryptData and OSCrypto.encryptData. r=MattN 2019-02-21 15:35:27 +00:00
MSMigrationUtils.jsm Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
MigrationUtils.jsm Bug 1522856 - Add an "import" option to the file menu to make browser migration discoverable. r=MattN,felipe 2019-03-04 15:29:03 -08:00
ProfileMigrator.jsm Bug 1524688: Part 6 - Convert profile migrators to static registration r=MattN 2019-01-29 18:20:19 -08:00
SafariProfileMigrator.jsm Bug 1524688: Part 6 - Convert profile migrators to static registration r=MattN 2019-01-29 18:20:19 -08:00
components.conf Bug 1524688: Part 6 - Convert profile migrators to static registration r=MattN 2019-01-29 18:20:19 -08:00
jar.mn
moz.build Bug 1533288 - Add an executable to insert IE history on test machines. r=jaws,firefox-build-system-reviewers,mshal 2019-03-13 03:12:08 +00:00
nsIBrowserProfileMigrator.idl Bug 1434167 - remove getSourceHomePageURL implementations and callsites, r=dthayer 2018-02-07 10:18:46 +00:00
nsIEHistoryEnumerator.cpp Bug 1533288 - Don't assume HasMoreElements() is called before GetNext() in nsIEHistoryEnumerator. r=jaws 2019-03-13 03:11:52 +00:00
nsIEHistoryEnumerator.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
nsWindowsMigrationUtils.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00