зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1484059 p1 - Pass both the profile name and the profile dir in initGecko() r=jchen
GeckoProfile.initFromArgs is called using the values set in initGecko. initFromArgs will then only recognize a profileDir, leave profileName null, and then call GeckoProfile.get who will then create a "Custom (anonymous) profile with specified dir." type of GeckoProfile, which is incorrect. We fix the profile by specifying both -profile and -P in the args string. Differential Revision: https://phabricator.services.mozilla.com/D7671 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2f17eea600
Коммит
ad5e1f5d33
|
@ -199,14 +199,18 @@ public abstract class GeckoService extends JobIntentService {
|
|||
profileDir != null ? new File(profileDir) : null);
|
||||
}
|
||||
|
||||
String args;
|
||||
StringBuilder args = new StringBuilder();
|
||||
if (profileDir != null) {
|
||||
args = "-profile " + profileDir;
|
||||
} else {
|
||||
args = "-P " + profileName;
|
||||
args.append("-profile ").append(profileDir);
|
||||
}
|
||||
if (profileName != null) {
|
||||
if (args.length() > 0) {
|
||||
args.append(' ');
|
||||
}
|
||||
args.append("-P ").append(profileName);
|
||||
}
|
||||
|
||||
intent.putExtra(GeckoThread.EXTRA_ARGS, args);
|
||||
intent.putExtra(GeckoThread.EXTRA_ARGS, args.toString());
|
||||
GeckoApplication.createRuntime(this, new SafeIntent(intent));
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче