Bug 1428795 - Reset Marionette state when initialisation fails. r=automatedtester

If Marionette throws inside try...catch block that spawns the TCP
listener, we fail to reset the altered recommended preferences to
their original state, leaving a possibility of tainting the profile.
By calling the uninitialisation code when an error is thrown we
ensure all relevant state gets reset.

MozReview-Commit-ID: XiiIEFMZQY

--HG--
extra : rebase_source : 1a38e446931c916af7f37ffc928683df47f0bba4
This commit is contained in:
Andreas Tolfsen 2018-02-26 20:37:58 +00:00
Родитель 1d2ab66b43
Коммит 4cae9e9df2
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -549,6 +549,7 @@ class MarionetteMainProcess {
this.server = listener;
} catch (e) {
log.fatal("Remote protocol server failed to start", e);
this.uninit();
Services.startup.quit(Ci.nsIAppStartup.eForceQuit);
}