diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2015-03-08 15:14:03 +0000 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2015-03-08 15:14:03 +0000 |
commit | 9a0fd32cf6e2ada37675bc743532c5004b16e5e3 (patch) | |
tree | d66faa3279486d2e8ad72bf70e7ef522460372a0 /data/patches/reduceGeckoPriority.patch | |
parent | 2732de330618bc29b7ab07f4004d8e84f698cf95 (diff) |
Added patches to fix build bugs for Windows, MacOS and Android
Diffstat (limited to 'data/patches/reduceGeckoPriority.patch')
-rw-r--r-- | data/patches/reduceGeckoPriority.patch | 18 |
1 files changed, 18 insertions, 0 deletions
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); |