Backed out changeset b57ec6985cd1 (bug 1531632) for Geckoview failures. CLOSED TREE

--HG--
extra : rebase_source : bf3f36df156ac78c02b027923af4a9615053fac2
This commit is contained in:
Dorel Luca 2019-03-07 02:29:50 +02:00
Родитель 7c4355ade7
Коммит 571984a7b6
1 изменённых файлов: 22 добавлений и 22 удалений

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

@ -271,6 +271,9 @@ public class GeckoThread extends Thread {
private static void initGeckoEnvironment() {
final Context context = GeckoAppShell.getApplicationContext();
GeckoLoader.loadMozGlue(context);
setState(State.MOZGLUE_READY);
final Locale locale = Locale.getDefault();
final Resources res = context.getResources();
if (locale.toString().equalsIgnoreCase("zh_hk")) {
@ -411,28 +414,6 @@ public class GeckoThread extends Thread {
};
Looper.myQueue().addIdleHandler(idleHandler);
final Context context = GeckoAppShell.getApplicationContext();
final List<String> env = getEnvFromExtras(mInitInfo.extras);
// In Gecko, the native crash reporter is enabled by default in opt builds, and
// disabled by default in debug builds.
if ((mInitInfo.flags & FLAG_ENABLE_NATIVE_CRASHREPORTER) == 0 && !BuildConfig.DEBUG_BUILD) {
env.add(0, "MOZ_CRASHREPORTER_DISABLE=1");
} else if ((mInitInfo.flags & FLAG_ENABLE_NATIVE_CRASHREPORTER) != 0 && BuildConfig.DEBUG_BUILD) {
env.add(0, "MOZ_CRASHREPORTER=1");
}
if (!isChildProcess() && ((mInitInfo.flags & FLAG_ENABLE_MARIONETTE) != 0)) {
// The presence of this environment variable determines the initial
// value of `marionette.enabled`.
env.add(0, "MOZ_MARIONETTE=1");
}
GeckoLoader.loadMozGlue(context);
setState(State.MOZGLUE_READY);
GeckoLoader.setupGeckoEnvironment(context, context.getFilesDir().getPath(), env, mInitInfo.prefs);
initGeckoEnvironment();
// Wait until initialization before calling Gecko entry point.
@ -464,12 +445,31 @@ public class GeckoThread extends Thread {
Log.w(LOGTAG, "zerdatime " + SystemClock.elapsedRealtime() + " - runGecko");
final Context context = GeckoAppShell.getApplicationContext();
final String[] args = isChildProcess() ? mInitInfo.args : getMainProcessArgs();
if ((mInitInfo.flags & FLAG_DEBUGGING) != 0) {
Log.i(LOGTAG, "RunGecko - args = " + TextUtils.join(" ", args));
}
final List<String> env = getEnvFromExtras(mInitInfo.extras);
// In Gecko, the native crash reporter is enabled by default in opt builds, and
// disabled by default in debug builds.
if ((mInitInfo.flags & FLAG_ENABLE_NATIVE_CRASHREPORTER) == 0 && !BuildConfig.DEBUG_BUILD) {
env.add(0, "MOZ_CRASHREPORTER_DISABLE=1");
} else if ((mInitInfo.flags & FLAG_ENABLE_NATIVE_CRASHREPORTER) != 0 && BuildConfig.DEBUG_BUILD) {
env.add(0, "MOZ_CRASHREPORTER=1");
}
if (!isChildProcess() && ((mInitInfo.flags & FLAG_ENABLE_MARIONETTE) != 0)) {
// The presence of this environment variable determines the initial
// value of `marionette.enabled`.
env.add(0, "MOZ_MARIONETTE=1");
}
GeckoLoader.setupGeckoEnvironment(context, context.getFilesDir().getPath(), env, mInitInfo.prefs);
// And go.
GeckoLoader.nativeRun(args,
mInitInfo.extras.getInt(EXTRA_PREFS_FD, -1),