diff -r 04bd13eb1a17 -r eaed6d702f04 components/desktop/firefox/patches/firefox-55-terminator.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/desktop/firefox/patches/firefox-55-terminator.patch Fri Apr 07 00:53:32 2017 -0700 @@ -0,0 +1,54 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=1232285 +https://bugzilla.mozilla.org/show_bug.cgi?id=1252382 + +And a fix to 1232285, which introduced division of crashAfterMS +by PR_MillisecondsToInterval(1000). crashAfterMS has to be divided +by 1000 to get number of seconds. + +--- a/toolkit/components/terminator/nsTerminator.cpp ++++ b/toolkit/components/terminator/nsTerminator.cpp +@@ -33,6 +33,12 @@ + #include "nsExceptionHandler.h" + #endif + ++#if defined(XP_WIN) ++#include ++#else ++#include ++#endif ++ + #include "mozilla/ArrayUtils.h" + #include "mozilla/Attributes.h" + #include "mozilla/DebugOnly.h" +@@ -53,9 +59,6 @@ + // forcefully. + #define ADDITIONAL_WAIT_BEFORE_CRASH_MS 3000 + +-// One second, in ticks. +-#define TICK_DURATION 1000 +- + namespace mozilla { + + namespace { +@@ -141,7 +144,11 @@ + // we have lost at most one second, which is much + // more reasonable. + // +- PR_Sleep(TICK_DURATION); ++#if defined(XP_WIN) ++ Sleep(1000 /* ms */); ++#else ++ usleep(1000000 /* usec */); ++#endif + + if (gHeartbeat++ < timeToLive) { + continue; +@@ -378,7 +385,7 @@ + } + + UniquePtr options(new Options()); +- options->crashAfterTicks = crashAfterMS / TICK_DURATION; ++ options->crashAfterTicks = crashAfterMS / 1000; + + DebugOnly watchdogThread = CreateSystemThread(RunWatchdog, + options.release());