1 From ef476662153730c082c0a42e9b284d97ff2bdda5 Mon Sep 17 00:00:00 2001
2 From: "jiri.kralovec@oracle.com" <jiri.kralovec@oracle.com>
3 Date: Fri, 7 Apr 2017 00:53:32 -0700
4 Subject: [PATCH] 25556325 Firefox 45 sometimes generates core file on exit
7 .../firefox/patches/firefox-55-terminator.patch | 54 ++++++++++++++++++++++
8 1 file changed, 54 insertions(+)
9 create mode 100644 components/desktop/firefox/patches/firefox-55-terminator.patch
11 diff --git a/components/desktop/firefox/patches/firefox-55-terminator.patch b/components/desktop/firefox/patches/firefox-55-terminator.patch
13 index 0000000..3cfbfba
15 +++ b/components/desktop/firefox/patches/firefox-55-terminator.patch
17 +https://bugzilla.mozilla.org/show_bug.cgi?id=1232285
18 +https://bugzilla.mozilla.org/show_bug.cgi?id=1252382
20 +And a fix to 1232285, which introduced division of crashAfterMS
21 +by PR_MillisecondsToInterval(1000). crashAfterMS has to be divided
22 +by 1000 to get number of seconds.
24 +--- a/toolkit/components/terminator/nsTerminator.cpp
25 ++++ b/toolkit/components/terminator/nsTerminator.cpp
27 + #include "nsExceptionHandler.h"
31 ++#include <windows.h>
36 + #include "mozilla/ArrayUtils.h"
37 + #include "mozilla/Attributes.h"
38 + #include "mozilla/DebugOnly.h"
41 + #define ADDITIONAL_WAIT_BEFORE_CRASH_MS 3000
43 +-// One second, in ticks.
44 +-#define TICK_DURATION 1000
50 + // we have lost at most one second, which is much
53 +- PR_Sleep(TICK_DURATION);
55 ++ Sleep(1000 /* ms */);
57 ++ usleep(1000000 /* usec */);
60 + if (gHeartbeat++ < timeToLive) {
65 + UniquePtr<Options> options(new Options());
66 +- options->crashAfterTicks = crashAfterMS / TICK_DURATION;
67 ++ options->crashAfterTicks = crashAfterMS / 1000;
69 + DebugOnly<PRThread*> watchdogThread = CreateSystemThread(RunWatchdog,