From 9a0fd32cf6e2ada37675bc743532c5004b16e5e3 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Sun, 8 Mar 2015 15:14:03 +0000 Subject: Added patches to fix build bugs for Windows, MacOS and Android --- data/patches/reduceGeckoPriority.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 data/patches/reduceGeckoPriority.patch (limited to 'data/patches/reduceGeckoPriority.patch') diff --git a/data/patches/reduceGeckoPriority.patch b/data/patches/reduceGeckoPriority.patch new file mode 100644 index 0000000..843d2c8 --- /dev/null +++ b/data/patches/reduceGeckoPriority.patch @@ -0,0 +1,18 @@ +diff -ur icecat-31.4.0.orig/mobile/android/base/util/ThreadUtils.java icecat-31.4.0/mobile/android/base/util/ThreadUtils.java +--- icecat-31.4.0.orig/mobile/android/base/util/ThreadUtils.java 2015-02-22 18:35:21.022789023 +0000 ++++ icecat-31.4.0/mobile/android/base/util/ThreadUtils.java 2015-02-22 22:09:50.518544343 +0000 +@@ -179,7 +179,13 @@ + * @param timeout Timeout in ms after which the priority will be reset + */ + public static void reduceGeckoPriority(long timeout) { +- if (!sIsGeckoPriorityReduced) { ++ if (Runtime.getRuntime().availableProcessors() > 1) { ++ // Don't reduce priority for multicore devices. We use availableProcessors() ++ // for its fast performance. It may give false negatives (i.e. multicore ++ // detected as single-core), but we can tolerate this behavior. ++ return; ++ } ++ if (!sIsGeckoPriorityReduced && sGeckoThread != null) { + sIsGeckoPriorityReduced = true; + sGeckoThread.setPriority(Thread.MIN_PRIORITY); + getUiHandler().postDelayed(sPriorityResetRunnable, timeout); -- cgit v1.2.3