aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2017-12-26 20:44:48 -0500
committerMark H Weaver <mhw@netris.org>2017-12-26 22:53:02 -0500
commite8e860a5596659e0ce2ed8911dfa78663e216bf9 (patch)
tree3e2f63a3f7da94f9bfb897744b1f5abc0bcbb651 /gnu/packages/patches
parentb3ecb3fe8d4a947a7807018647616f95532df3ac (diff)
downloadguix-e8e860a5596659e0ce2ed8911dfa78663e216bf9.tar
guix-e8e860a5596659e0ce2ed8911dfa78663e216bf9.tar.gz
gnu: icecat: Add more fixes from upstream mozilla-esr52.
* gnu/packages/gnuzilla.scm (icecat)[source]: Add selected fixes from the upstream mozilla-esr52 repository. * gnu/packages/patches/icecat-bug-1414945.patch, gnu/packages/patches/icecat-bug-1424373-pt2.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/icecat-bug-1414945.patch73
-rw-r--r--gnu/packages/patches/icecat-bug-1424373-pt2.patch183
2 files changed, 256 insertions, 0 deletions
diff --git a/gnu/packages/patches/icecat-bug-1414945.patch b/gnu/packages/patches/icecat-bug-1414945.patch
new file mode 100644
index 0000000000..3638ace1c4
--- /dev/null
+++ b/gnu/packages/patches/icecat-bug-1414945.patch
@@ -0,0 +1,73 @@
+Based on:
+ https://hg.mozilla.org/releases/mozilla-esr52/raw-rev/d303b3bb88c3
+
+Adapted to apply cleanly to IceCat.
+
+# HG changeset patch
+# User Philip Chimento <philip.chimento@gmail.com>
+# Date 1510012155 28800
+# Node ID d303b3bb88c3345d3a089901e2b6fe883d148e44
+# Parent 0152d097672f7e99504815cf7b06d9f303419fba
+Bug 1414945 - Don't use TimeDuration in static initializer. r=jandem, a=ritu
+
+On Darwin this would cause a race between two static initializers.
+
+diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
+--- a/js/src/shell/js.cpp
++++ b/js/src/shell/js.cpp
+@@ -138,17 +138,17 @@ static const size_t gMaxStackSize = 2 *
+ #else
+ static const size_t gMaxStackSize = 128 * sizeof(size_t) * 1024;
+ #endif
+
+ /*
+ * Limit the timeout to 30 minutes to prevent an overflow on platfoms
+ * that represent the time internally in microseconds using 32-bit int.
+ */
+-static const TimeDuration MAX_TIMEOUT_INTERVAL = TimeDuration::FromSeconds(1800.0);
++static const double MAX_TIMEOUT_SECONDS = 1800.0;
+
+ // SharedArrayBuffer and Atomics settings track IceCat. Choose a custom setting
+ // with --shared-memory={on,off}.
+ #ifndef RELEASE_OR_BETA
+ # define SHARED_MEMORY_DEFAULT 1
+ #else
+ # define SHARED_MEMORY_DEFAULT 0
+ #endif
+@@ -3518,16 +3518,17 @@ Sleep_fn(JSContext* cx, unsigned argc, V
+ if (!ToNumber(cx, args[0], &t_secs))
+ return false;
+ if (mozilla::IsNaN(t_secs)) {
+ JS_ReportErrorASCII(cx, "sleep interval is not a number");
+ return false;
+ }
+
+ duration = TimeDuration::FromSeconds(Max(0.0, t_secs));
++ const TimeDuration MAX_TIMEOUT_INTERVAL = TimeDuration::FromSeconds(MAX_TIMEOUT_SECONDS);
+ if (duration > MAX_TIMEOUT_INTERVAL) {
+ JS_ReportErrorASCII(cx, "Excessive sleep interval");
+ return false;
+ }
+ }
+ {
+ LockGuard<Mutex> guard(sc->watchdogLock);
+ TimeStamp toWakeup = TimeStamp::Now() + duration;
+@@ -3675,16 +3676,17 @@ CancelExecution(JSContext* cx)
+
+ static bool
+ SetTimeoutValue(JSContext* cx, double t)
+ {
+ if (mozilla::IsNaN(t)) {
+ JS_ReportErrorASCII(cx, "timeout is not a number");
+ return false;
+ }
++ const TimeDuration MAX_TIMEOUT_INTERVAL = TimeDuration::FromSeconds(MAX_TIMEOUT_SECONDS);
+ if (TimeDuration::FromSeconds(t) > MAX_TIMEOUT_INTERVAL) {
+ JS_ReportErrorASCII(cx, "Excessive timeout value");
+ return false;
+ }
+ GetShellContext(cx)->timeoutInterval = t;
+ if (!ScheduleWatchdog(cx, t)) {
+ JS_ReportErrorASCII(cx, "Failed to create the watchdog");
+ return false;
+
diff --git a/gnu/packages/patches/icecat-bug-1424373-pt2.patch b/gnu/packages/patches/icecat-bug-1424373-pt2.patch
new file mode 100644
index 0000000000..cdc7226bd3
--- /dev/null
+++ b/gnu/packages/patches/icecat-bug-1424373-pt2.patch
@@ -0,0 +1,183 @@
+Based on:
+ https://hg.mozilla.org/releases/mozilla-esr52/raw-rev/19ea736e7e3d
+
+Adapted to apply cleanly to IceCat.
+
+# HG changeset patch
+# User Mike Conley <mconley@mozilla.com>
+# Date 1513892173 18000
+# Node ID 19ea736e7e3d20555ee6633b9d7803c1225979e1
+# Parent 320032aaa06899f5585dcd0288059e5342118714
+Bug 1424373 - Rename crash report submission pref. r=Mossop a=jcristau
+
+diff --git a/browser/app/profile/icecat.js b/browser/app/profile/icecat.js
+--- a/browser/app/profile/icecat.js
++++ b/browser/app/profile/icecat.js
+@@ -1557,15 +1557,15 @@ pref("browser.crashReports.unsubmittedCh
+ pref("browser.crashReports.unsubmittedCheck.enabled", false);
+ #endif
+
+ // chancesUntilSuppress is how many times we'll show the unsubmitted
+ // crash report notification across different days and shutdown
+ // without a user choice before we suppress the notification for
+ // some number of days.
+ pref("browser.crashReports.unsubmittedCheck.chancesUntilSuppress", 4);
+-pref("browser.crashReports.unsubmittedCheck.autoSubmit", false);
++pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
+
+ #ifdef NIGHTLY_BUILD
+ // Enable the (fairly costly) client/server validation on nightly only. The other prefs
+ // controlling validation are located in /services/sync/services-sync.js
+ pref("services.sync.validation.enabled", true);
+ #endif
+diff --git a/browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js b/browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js
+--- a/browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js
++++ b/browser/base/content/test/tabcrashed/browser_autoSubmitRequest.js
+@@ -1,12 +1,12 @@
+ "use strict";
+
+ const PAGE = "data:text/html,<html><body>A%20regular,%20everyday,%20normal%20page.";
+-const AUTOSUBMIT_PREF = "browser.crashReports.unsubmittedCheck.autoSubmit";
++const AUTOSUBMIT_PREF = "browser.crashReports.unsubmittedCheck.autoSubmit2";
+
+ const {TabStateFlusher} =
+ Cu.import("resource:///modules/sessionstore/TabStateFlusher.jsm", {});
+
+ // On debug builds, crashing tabs results in much thinking, which
+ // slows down the test and results in intermittent test timeouts,
+ // so we'll pump up the expected timeout for this test.
+ requestLongerTimeout(2);
+diff --git a/browser/components/preferences/in-content/advanced.xul b/browser/components/preferences/in-content/advanced.xul
+--- a/browser/components/preferences/in-content/advanced.xul
++++ b/browser/components/preferences/in-content/advanced.xul
+@@ -51,18 +51,18 @@
+ #ifdef MOZ_TELEMETRY_REPORTING
+ <preference id="toolkit.telemetry.enabled"
+ name="toolkit.telemetry.enabled"
+ type="bool"/>
+ #endif
+
+ <!-- Data Choices tab -->
+ #ifdef MOZ_CRASHREPORTER
+- <preference id="browser.crashReports.unsubmittedCheck.autoSubmit"
+- name="browser.crashReports.unsubmittedCheck.autoSubmit"
++ <preference id="browser.crashReports.unsubmittedCheck.autoSubmit2"
++ name="browser.crashReports.unsubmittedCheck.autoSubmit2"
+ type="bool"/>
+ #endif
+
+ <!-- Network tab -->
+ <preference id="browser.cache.disk.capacity"
+ name="browser.cache.disk.capacity"
+ type="int"/>
+ <preference id="browser.offline-apps.notify"
+@@ -232,17 +232,17 @@
+ </hbox>
+ </vbox>
+ </groupbox>
+ #endif
+ #ifdef MOZ_CRASHREPORTER
+ <groupbox>
+ <caption>
+ <checkbox id="automaticallySubmitCrashesBox"
+- preference="browser.crashReports.unsubmittedCheck.autoSubmit"
++ preference="browser.crashReports.unsubmittedCheck.autoSubmit2"
+ label="&alwaysSubmitCrashReports.label;"
+ accesskey="&alwaysSubmitCrashReports.accesskey;"/>
+ </caption>
+ <hbox class="indent">
+ <label flex="1">&crashReporterDesc2.label;</label>
+ <spacer flex="10"/>
+ <label id="crashReporterLearnMore"
+ class="text-link">&crashReporterLearnMore.label;</label>
+diff --git a/browser/components/sessionstore/test/browser_background_tab_crash.js b/browser/components/sessionstore/test/browser_background_tab_crash.js
+--- a/browser/components/sessionstore/test/browser_background_tab_crash.js
++++ b/browser/components/sessionstore/test/browser_background_tab_crash.js
+@@ -142,17 +142,17 @@ add_task(function* test_background_crash
+ /**
+ * Tests that if a content process crashes taking down only
+ * background tabs, and the user is configured to send backlogged
+ * crash reports automatically, that the tab crashed page is not
+ * shown.
+ */
+ add_task(function* test_background_crash_autosubmit_backlogged() {
+ yield SpecialPowers.pushPrefEnv({
+- set: [["browser.crashReports.unsubmittedCheck.autoSubmit", true]],
++ set: [["browser.crashReports.unsubmittedCheck.autoSubmit2", true]],
+ });
+
+ yield setupBackgroundTabs(function*([tab1, tab2]) {
+ // Let's crash one of those background tabs now...
+ yield crashBackgroundTabs([tab1, tab2]);
+
+ // Selecting the first tab should restore it.
+ let tabRestored = promiseTabRestored(tab1);
+diff --git a/browser/modules/ContentCrashHandlers.jsm b/browser/modules/ContentCrashHandlers.jsm
+--- a/browser/modules/ContentCrashHandlers.jsm
++++ b/browser/modules/ContentCrashHandlers.jsm
+@@ -865,21 +865,21 @@ this.UnsubmittedCrashHandler = {
+ return nb.appendNotification(message, notificationID,
+ "chrome://browser/skin/tab-crashed.svg",
+ nb.PRIORITY_INFO_HIGH, buttons,
+ eventCallback);
+ },
+
+ get autoSubmit() {
+ return Services.prefs
+- .getBoolPref("browser.crashReports.unsubmittedCheck.autoSubmit");
++ .getBoolPref("browser.crashReports.unsubmittedCheck.autoSubmit2");
+ },
+
+ set autoSubmit(val) {
+- Services.prefs.setBoolPref("browser.crashReports.unsubmittedCheck.autoSubmit",
++ Services.prefs.setBoolPref("browser.crashReports.unsubmittedCheck.autoSubmit2",
+ val);
+ },
+
+ /**
+ * Attempt to submit reports to the crash report server. Each
+ * report will have the "SubmittedFromInfobar" extra key set
+ * to true.
+ *
+diff --git a/browser/modules/test/browser_UnsubmittedCrashHandler.js b/browser/modules/test/browser_UnsubmittedCrashHandler.js
+--- a/browser/modules/test/browser_UnsubmittedCrashHandler.js
++++ b/browser/modules/test/browser_UnsubmittedCrashHandler.js
+@@ -344,17 +344,17 @@ add_task(function* test_can_submit_sever
+ clearPendingCrashReports();
+ });
+
+ /**
+ * Tests that choosing "Send Always" flips the autoSubmit pref
+ * and sends the pending crash reports.
+ */
+ add_task(function* test_can_submit_always() {
+- let pref = "browser.crashReports.unsubmittedCheck.autoSubmit";
++ let pref = "browser.crashReports.unsubmittedCheck.autoSubmit2";
+ Assert.equal(Services.prefs.getBoolPref(pref), false,
+ "We should not be auto-submitting by default");
+
+ let reportIDs = yield createPendingCrashReports(1);
+ let notification =
+ yield UnsubmittedCrashHandler.checkForUnsubmittedCrashReports();
+ Assert.ok(notification, "There should be a notification");
+
+@@ -388,17 +388,17 @@ add_task(function* test_can_submit_alway
+
+ /**
+ * Tests that if the user has chosen to automatically send
+ * crash reports that no notification is displayed to the
+ * user.
+ */
+ add_task(function* test_can_auto_submit() {
+ yield SpecialPowers.pushPrefEnv({ set: [
+- ["browser.crashReports.unsubmittedCheck.autoSubmit", true],
++ ["browser.crashReports.unsubmittedCheck.autoSubmit2", true],
+ ]});
+
+ let reportIDs = yield createPendingCrashReports(3);
+ let promiseReports = waitForSubmittedReports(reportIDs);
+ let notification =
+ yield UnsubmittedCrashHandler.checkForUnsubmittedCrashReports();
+ Assert.equal(notification, null, "There should be no notification");
+ info("Waiting on reports to be received.");
+