Bug 1432429 Remove MOZ_FUZZYFOX ifdefs and build it unconditionally 9/14 draft
authorTom Ritter <tom@mozilla.com>
Fri, 06 Jul 2018 10:52:10 -0500
changeset 815068 7e035e1fd6fc23f8816da72099ebdd395df4656c
parent 815067 fb3fefc0fb5308cbd888452dfeff6decb873bc22
child 815069 46321dc5e385dd071e2dc7b39bc5caa5a34f9a3a
push id115424
push userbmo:tom@mozilla.com
push dateFri, 06 Jul 2018 17:03:34 +0000
bugs1432429
milestone62.0a1
Bug 1432429 Remove MOZ_FUZZYFOX ifdefs and build it unconditionally 9/14 MozReview-Commit-ID: DjjP8ZLQhhz
dom/performance/Performance.cpp
dom/workers/RuntimeService.cpp
dom/workers/RuntimeService.h
dom/workers/WorkerPrivate.cpp
dom/workers/WorkerPrivate.h
js/moz.configure
js/src/jsapi.cpp
js/src/jsapi.h
js/src/vm/Runtime.cpp
js/src/vm/Runtime.h
js/src/vm/Time.cpp
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/src/moz.build
js/xpconnect/src/xpcprivate.h
layout/base/nsRefreshDriver.cpp
layout/build/nsLayoutStatics.cpp
mozglue/misc/TimeStamp.cpp
mozglue/misc/TimeStamp.h
mozglue/misc/TimeStamp_darwin.cpp
mozglue/misc/TimeStamp_posix.cpp
mozglue/misc/TimeStamp_windows.cpp
netwerk/protocol/http/moz.build
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpChannel.h
toolkit/components/moz.build
--- a/dom/performance/Performance.cpp
+++ b/dom/performance/Performance.cpp
@@ -101,21 +101,17 @@ Performance::Now()
   const double maxResolutionMs = 0.020;
   DOMHighResTimeStamp minimallyClamped = floor(rawTime / maxResolutionMs) * maxResolutionMs;
   return nsRFPService::ReduceTimePrecisionAsMSecs(minimallyClamped, GetRandomTimelineSeed());
 }
 
 DOMHighResTimeStamp
 Performance::NowUnclamped() const
 {
-#ifdef MOZ_FUZZYFOX
   TimeDuration duration = TimeStamp::NowReally() - CreationTimeStamp();
-#else
-  TimeDuration duration = TimeStamp::Now() - CreationTimeStamp();
-#endif
   return duration.ToMilliseconds();
 }
 
 DOMHighResTimeStamp
 Performance::TimeOrigin()
 {
   if (!mPerformanceService) {
     mPerformanceService = PerformanceService::GetOrCreate();
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -1738,21 +1738,19 @@ RuntimeService::Init()
                                  false))) {
     NS_WARNING("Failed to register for memory pressure notifications!");
   }
 
   if (NS_FAILED(obs->AddObserver(this, NS_IOSERVICE_OFFLINE_STATUS_TOPIC, false))) {
     NS_WARNING("Failed to register for offline notification event!");
   }
 
-#ifdef MOZ_FUZZYFOX
   if (NS_FAILED(obs->AddObserver(this, FUZZYFOX_UPDATECLOCK_OBSERVER_TOPIC, false))) {
     NS_WARNING("Failed to register for fuzzyfox update clock!");
   }
-#endif
 
   MOZ_ASSERT(!gRuntimeServiceDuringInit, "This should be false!");
   gRuntimeServiceDuringInit = true;
 
   if (NS_FAILED(Preferences::RegisterPrefixCallback(
                                  LoadJSGCMemoryOptions,
                                  PREF_JS_OPTIONS_PREFIX PREF_MEM_OPTIONS_PREFIX)) ||
       NS_FAILED(Preferences::RegisterPrefixCallbackAndCall(
@@ -2104,21 +2102,19 @@ RuntimeService::Cleanup()
         NS_WARNING("Failed to unregister for memory pressure notifications!");
       }
 
       if (NS_FAILED(obs->RemoveObserver(this,
                                         NS_IOSERVICE_OFFLINE_STATUS_TOPIC))) {
         NS_WARNING("Failed to unregister for offline notification event!");
       }
 
-#ifdef MOZ_FUZZYFOX
       if (NS_FAILED(obs->RemoveObserver(this, FUZZYFOX_UPDATECLOCK_OBSERVER_TOPIC))) {
         NS_WARNING("Failed to unregister for fuzzyfox update clock!");
       }
-#endif
 
       obs->RemoveObserver(this, NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID);
       obs->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
       mObserved = false;
     }
   }
 
   nsLayoutStatics::Release();
@@ -2543,34 +2539,32 @@ RuntimeService::CycleCollectAllWorkers()
 }
 
 void
 RuntimeService::SendOfflineStatusChangeEventToAllWorkers(bool aIsOffline)
 {
   BROADCAST_ALL_WORKERS(OfflineStatusChangeEvent, aIsOffline);
 }
 
-#ifdef MOZ_FUZZYFOX
 void
 RuntimeService::SendFuzzyFoxClockToAllWorkers(nsISupports* aData)
 {
   nsCOMPtr<nsISupportsPRInt64> wrapper = do_QueryInterface(aData);
   if (NS_WARN_IF(!wrapper)) {
     return;
   }
 
   int64_t newTime = 0;
   nsresult rv = wrapper->GetData(&newTime);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return;
   }
 
   BROADCAST_ALL_WORKERS(UpdateFuzzyFoxClock, newTime);
 }
-#endif
 
 void
 RuntimeService::MemoryPressureAllWorkers()
 {
   BROADCAST_ALL_WORKERS(MemoryPressure, /* dummy = */ false);
 }
 
 uint32_t
@@ -2634,22 +2628,20 @@ RuntimeService::Observe(nsISupports* aSu
     MemoryPressureAllWorkers();
     return NS_OK;
   }
   if (!strcmp(aTopic, NS_IOSERVICE_OFFLINE_STATUS_TOPIC)) {
     SendOfflineStatusChangeEventToAllWorkers(NS_IsOffline());
     return NS_OK;
   }
 
-#ifdef MOZ_FUZZYFOX
   if (!strcmp(aTopic, FUZZYFOX_UPDATECLOCK_OBSERVER_TOPIC)) {
     SendFuzzyFoxClockToAllWorkers(aSubject);
     return NS_OK;
   }
-#endif
 
   NS_NOTREACHED("Unknown observer topic!");
   return NS_OK;
 }
 
 bool
 LogViolationDetailsRunnable::MainThreadRun()
 {
--- a/dom/workers/RuntimeService.h
+++ b/dom/workers/RuntimeService.h
@@ -226,20 +226,18 @@ public:
   GarbageCollectAllWorkers(bool aShrinking);
 
   void
   CycleCollectAllWorkers();
 
   void
   SendOfflineStatusChangeEventToAllWorkers(bool aIsOffline);
 
-#ifdef MOZ_FUZZYFOX
   void
   SendFuzzyFoxClockToAllWorkers(nsISupports* aData);
-#endif
 
   void
   MemoryPressureAllWorkers();
 
   uint32_t ClampedHardwareConcurrency() const;
 
   void CrashIfHanging();
 
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -755,17 +755,16 @@ private:
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     aWorkerPrivate->UpdateContextOptionsInternal(aCx, mContextOptions);
     return true;
   }
 };
 
-#ifdef MOZ_FUZZYFOX
 class UpdateFuzzyFoxClockRunnable final : public WorkerRunnable
 {
   int64_t mNewTime;
 
 public:
   UpdateFuzzyFoxClockRunnable(WorkerPrivate* aWorkerPrivate,
                              int64_t aNewTime)
     : WorkerRunnable(aWorkerPrivate)
@@ -774,17 +773,16 @@ public:
 
   virtual bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
   {
     JS_UpdateLockedClock(aCx, mNewTime);
     return true;
   }
 };
-#endif
 
 class UpdateLanguagesRunnable final : public WorkerRunnable
 {
   nsTArray<nsString> mLanguages;
 
 public:
   UpdateLanguagesRunnable(WorkerPrivate* aWorkerPrivate,
                           const nsTArray<nsString>& aLanguages)
@@ -2208,29 +2206,27 @@ WorkerPrivate::OfflineStatusChangeEventI
   RefPtr<Event> event = NS_NewDOMEvent(globalScope, nullptr, nullptr);
 
   event->InitEvent(eventType, false, false);
   event->SetTrusted(true);
 
   globalScope->DispatchEvent(*event);
 }
 
-#ifdef MOZ_FUZZYFOX
 void
 WorkerPrivate::UpdateFuzzyFoxClock(int64_t aNewTime)
 {
   AssertIsOnParentThread();
 
   RefPtr<UpdateFuzzyFoxClockRunnable> runnable =
     new UpdateFuzzyFoxClockRunnable(this, aNewTime);
   if (!runnable->Dispatch()) {
     NS_WARNING("Failed to dispatch fuzzy fox clock update event!");
   }
 }
-#endif
 
 void
 WorkerPrivate::MemoryPressure(bool aDummy)
 {
   AssertIsOnParentThread();
 
   RefPtr<MemoryPressureRunnable> runnable = new MemoryPressureRunnable(this);
   Unused << NS_WARN_IF(!runnable->Dispatch());
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
@@ -1153,20 +1153,18 @@ public:
 #ifdef JS_GC_ZEAL
   void
   UpdateGCZeal(uint8_t aGCZeal, uint32_t aFrequency);
 #endif
 
   void
   OfflineStatusChangeEvent(bool aIsOffline);
 
-#ifdef MOZ_FUZZYFOX
   void
   UpdateFuzzyFoxClock(int64_t aNewTime);
-#endif
 
   nsresult
   Dispatch(already_AddRefed<WorkerRunnable> aRunnable,
            nsIEventTarget* aSyncLoopTarget = nullptr);
 
   nsresult
   DispatchControlRunnable(already_AddRefed<WorkerControlRunnable> aWorkerControlRunnable);
 
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -470,16 +470,8 @@ set_define('ENABLE_PIPELINE_OPERATOR', e
 def enable_build_binast(target, milestone):
     # For reasons unknown at this time, BinAST causes timeouts on win32
     # and failures on Android.
     if milestone.is_nightly and not (target.kernel == 'WINNT' and target.cpu == 'x86') and not (target.os == 'Android'):
         return True
 
 set_define('JS_BUILD_BINAST', enable_build_binast)
 set_config('JS_BUILD_BINAST', enable_build_binast)
-
-# FuzzyFox
-# ==============================================================
-js_option('--enable-fuzzyfox', help='Enable FuzzyFox')
-set_config('MOZ_FUZZYFOX',
-           depends_if('--enable-fuzzyfox')(lambda x: True))
-set_define('MOZ_FUZZYFOX',
-           depends_if('--enable-fuzzyfox')(lambda x: True))
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -5701,23 +5701,21 @@ JS_RequestInterruptCallback(JSContext* c
 }
 
 JS_PUBLIC_API(void)
 JS_RequestInterruptCallbackCanWait(JSContext* cx)
 {
     cx->requestInterrupt(InterruptReason::CallbackCanWait);
 }
 
-#ifdef MOZ_FUZZYFOX
 JS_PUBLIC_API(void)
 JS_UpdateLockedClock(JSContext* cx, int64_t update)
 {
     cx->runtime()->updateLockedClock(update);
 }
-#endif
 
 JS::AutoSetAsyncStackForNewCalls::AutoSetAsyncStackForNewCalls(
   JSContext* cx, HandleObject stack, const char* asyncCause,
   JS::AutoSetAsyncStackForNewCalls::AsyncCallKind kind)
   : cx(cx),
     oldAsyncStack(cx, cx->asyncStackForNewActivations()),
     oldAsyncCause(cx->asyncCauseForNewActivations),
     oldAsyncCallIsExplicit(cx->asyncCallIsExplicit)
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -5483,20 +5483,18 @@ extern JS_PUBLIC_API(bool)
 JS_GetPendingException(JSContext* cx, JS::MutableHandleValue vp);
 
 extern JS_PUBLIC_API(void)
 JS_SetPendingException(JSContext* cx, JS::HandleValue v);
 
 extern JS_PUBLIC_API(void)
 JS_ClearPendingException(JSContext* cx);
 
-#ifdef MOZ_FUZZYFOX
 extern JS_PUBLIC_API(void)
 JS_UpdateLockedClock(JSContext* cx, int64_t update);
-#endif
 
 namespace JS {
 
 /**
  * Save and later restore the current exception state of a given JSContext.
  * This is useful for implementing behavior in C++ that's like try/catch
  * or try/finally in JS.
  *
--- a/js/src/vm/Runtime.cpp
+++ b/js/src/vm/Runtime.cpp
@@ -806,17 +806,16 @@ void
 JSRuntime::setUsedByHelperThread(Zone* zone)
 {
     MOZ_ASSERT(!zone->usedByHelperThread());
     MOZ_ASSERT(!zone->wasGCStarted());
     zone->setUsedByHelperThread();
     numActiveHelperThreadZones++;
 }
 
-#ifdef MOZ_FUZZYFOX
 void
 JSRuntime::updateLockedClock(int64_t update)
 {
     fuzzyfoxClock.updateFuzzyfoxClock(update);
 }
 
 bool
 JSRuntime::hasValidFuzzyfoxClock() const
@@ -824,17 +823,16 @@ JSRuntime::hasValidFuzzyfoxClock() const
     return fuzzyfoxClock.isClockStarted();
 }
 
 int64_t
 JSRuntime::getFuzzyfoxClock() const
 {
     return fuzzyfoxClock.getFuzzyfoxClock();
 }
-#endif
 
 void
 JSRuntime::clearUsedByHelperThread(Zone* zone)
 {
     MOZ_ASSERT(zone->usedByHelperThread());
     zone->clearUsedByHelperThread();
     numActiveHelperThreadZones--;
     JSContext* cx = mainContextFromOwnThread();
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -37,19 +37,17 @@
 #endif
 #include "js/UniquePtr.h"
 #include "js/Vector.h"
 #include "threading/Thread.h"
 #include "vm/Caches.h"
 #include "vm/CodeCoverage.h"
 #include "vm/CommonPropertyNames.h"
 #include "vm/DateTime.h"
-#ifdef MOZ_FUZZYFOX
 #include "vm/FuzzyfoxClock.h"
-#endif
 #include "vm/GeckoProfiler.h"
 #include "vm/JSAtom.h"
 #include "vm/JSScript.h"
 #include "vm/Scope.h"
 #include "vm/SharedImmutableStringsCache.h"
 #include "vm/Stack.h"
 #include "vm/Stopwatch.h"
 #include "vm/SymbolType.h"
@@ -965,25 +963,23 @@ struct JSRuntime : public js::MallocProv
 
         // if non-null, any call to `setPendingException`
         // in this runtime will trigger the call to `interceptor`
         JSErrorInterceptor* interceptor;
     };
     ErrorInterceptionSupport errorInterception;
 #endif // defined(NIGHTLY_BUILD)
 
-#ifdef MOZ_FUZZYFOX
   public:
     void updateLockedClock(int64_t update);
     bool hasValidFuzzyfoxClock() const;
     int64_t getFuzzyfoxClock() const;
 
   private:
     js::FuzzyfoxClock fuzzyfoxClock;
-#endif
 };
 
 namespace js {
 
 /*
  * RAII class that takes the GC lock while it is live.
  *
  * Usually functions will pass const references of this class.  However
--- a/js/src/vm/Time.cpp
+++ b/js/src/vm/Time.cpp
@@ -44,21 +44,19 @@ extern int gettimeofday(struct timeval* 
 #endif /* XP_UNIX */
 
 using mozilla::DebugOnly;
 
 #if defined(XP_UNIX)
 int64_t
 PRMJ_Now()
 {
-#ifdef MOZ_FUZZYFOX
     JSContext* cx = js::TlsContext.get();
     if (cx && cx->runtime()->hasValidFuzzyfoxClock())
         return cx->runtime()->getFuzzyfoxClock();
-#endif
 
     struct timeval tv;
 
 #ifdef _SVID_GETTOD   /* Defined only on Solaris, see Solaris <sys/types.h> */
     gettimeofday(&tv);
 #else
     gettimeofday(&tv, 0);
 #endif /* _SVID_GETTOD */
@@ -156,21 +154,19 @@ PRMJ_NowShutdown()
 #define MUTEX_LOCK(m) EnterCriticalSection(m)
 #define MUTEX_UNLOCK(m) LeaveCriticalSection(m)
 #define MUTEX_SETSPINCOUNT(m, c) SetCriticalSectionSpinCount((m),(c))
 
 // Please see bug 363258 for why the win32 timing code is so complex.
 int64_t
 PRMJ_Now()
 {
-#ifdef MOZ_FUZZYFOX
     JSContext* cx = js::TlsContext.get();
     if (cx && cx->runtime()->hasValidFuzzyfoxClock())
         return cx->runtime()->getFuzzyfoxClock();
-#endif
 
     if (pGetSystemTimePreciseAsFileTime) {
         // Windows 8 has a new API function that does all the work.
         FILETIME ft;
         pGetSystemTimePreciseAsFileTime(&ft);
         return int64_t(FileTimeToUnixMicroseconds(ft));
     }
 
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -51,19 +51,17 @@
 #include "mozilla/ProcessHangMonitor.h"
 #include "mozilla/Sprintf.h"
 #include "mozilla/UniquePtrExtensions.h"
 #include "mozilla/Unused.h"
 #include "AccessCheck.h"
 #include "nsGlobalWindow.h"
 #include "nsAboutProtocolUtils.h"
 
-#ifdef MOZ_FUZZYFOX
 #include "FuzzyfoxClockUpdater.h"
-#endif
 
 #include "GeckoProfiler.h"
 #include "nsIInputStream.h"
 #include "nsIXULRuntime.h"
 #include "nsJSPrincipals.h"
 
 #ifdef XP_WIN
 #include <windows.h>
@@ -1067,22 +1065,20 @@ XPCJSRuntime::Shutdown(JSContext* cx)
     mClassInfo2NativeSetMap = nullptr;
 
     delete mNativeSetMap;
     mNativeSetMap = nullptr;
 
     delete mDyingWrappedNativeProtoMap;
     mDyingWrappedNativeProtoMap = nullptr;
 
-#ifdef MOZ_FUZZYFOX
     if (mFuzzyfoxClockUpdater) {
         mFuzzyfoxClockUpdater->Shutdown();
         mFuzzyfoxClockUpdater = nullptr;
     }
-#endif
 
     CycleCollectedJSRuntime::Shutdown(cx);
 }
 
 XPCJSRuntime::~XPCJSRuntime()
 {
     MOZ_COUNT_DTOR_INHERITED(XPCJSRuntime, CycleCollectedJSRuntime);
 }
@@ -2890,19 +2886,17 @@ XPCJSRuntime::Initialize(JSContext* cx)
     RegisterJSMainRuntimeGCHeapDistinguishedAmount(JSMainRuntimeGCHeapDistinguishedAmount);
     RegisterJSMainRuntimeTemporaryPeakDistinguishedAmount(JSMainRuntimeTemporaryPeakDistinguishedAmount);
     RegisterJSMainRuntimeRealmsSystemDistinguishedAmount(JSMainRuntimeRealmsSystemDistinguishedAmount);
     RegisterJSMainRuntimeRealmsUserDistinguishedAmount(JSMainRuntimeRealmsUserDistinguishedAmount);
     mozilla::RegisterJSSizeOfTab(JSSizeOfTab);
 
     xpc_LocalizeRuntime(JS_GetRuntime(cx));
 
-#ifdef MOZ_FUZZYFOX
     mFuzzyfoxClockUpdater = FuzzyfoxClockUpdater::Create();
-#endif
 }
 
 bool
 XPCJSRuntime::InitializeStrings(JSContext* cx)
 {
     JSAutoRequest ar(cx);
 
     // if it is our first context then we need to generate our string ids
--- a/js/xpconnect/src/moz.build
+++ b/js/xpconnect/src/moz.build
@@ -8,16 +8,17 @@ EXPORTS += [
     'BackstagePass.h',
     'XPCJSMemoryReporter.h',
     'xpcObjectHelper.h',
     'xpcpublic.h',
 ]
 
 UNIFIED_SOURCES += [
     'ExportHelpers.cpp',
+    'FuzzyfoxClockUpdater.cpp',
     'nsXPConnect.cpp',
     'Sandbox.cpp',
     'XPCCallContext.cpp',
     'XPCComponents.cpp',
     'XPCConvert.cpp',
     'XPCDebug.cpp',
     'XPCException.cpp',
     'XPCJSContext.cpp',
@@ -38,21 +39,16 @@ UNIFIED_SOURCES += [
     'XPCWrappedNative.cpp',
     'XPCWrappedNativeInfo.cpp',
     'XPCWrappedNativeJSOps.cpp',
     'XPCWrappedNativeProto.cpp',
     'XPCWrappedNativeScope.cpp',
     'XPCWrapper.cpp',
 ]
 
-if CONFIG['MOZ_FUZZYFOX']:
-    UNIFIED_SOURCES += [
-        'FuzzyfoxClockUpdater.cpp',
-    ]
-
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../loader',
     '../wrappers',
     '/caps',
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -156,19 +156,17 @@
 #endif
 #ifdef GetClassName
 #undef GetClassName
 #endif
 #endif /* XP_WIN */
 
 namespace mozilla {
 
-#ifdef MOZ_FUZZYFOX
 class FuzzyfoxClockUpdater;
-#endif
 
 namespace dom {
 class Exception;
 } // namespace dom
 
 } // namespace mozilla
 
 /***************************************************************************/
@@ -617,20 +615,17 @@ private:
     XPCRootSetElem* mWrappedJSRoots;
     nsTArray<xpcGCCallback> extraGCCallbacks;
     JS::GCSliceCallback mPrevGCSliceCallback;
     JS::DoCycleCollectionCallback mPrevDoCycleCollectionCallback;
     JS::PersistentRootedObject mUnprivilegedJunkScope;
     JS::PersistentRootedObject mPrivilegedJunkScope;
     JS::PersistentRootedObject mCompilationScope;
     RefPtr<AsyncFreeSnowWhite> mAsyncSnowWhiteFreer;
-
-#ifdef MOZ_FUZZYFOX
     RefPtr<mozilla::FuzzyfoxClockUpdater> mFuzzyfoxClockUpdater;
-#endif
 
     friend class XPCJSContext;
     friend class XPCIncrementalReleaseRunnable;
 };
 
 inline JS::HandleId
 XPCJSContext::GetStringID(unsigned index) const
 {
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -660,26 +660,22 @@ private:
         aVsyncTimestamp = mRecentVsync;
         mProcessedVsync = true;
       } else {
 
         mLastChildTick = TimeStamp::Now();
         mLastProcessedTickInChildProcess = aVsyncTimestamp;
       }
 
-#ifdef MOZ_FUZZYFOX
       TimeStamp rightnow = TimeStamp::Now();
       // fuzzyfox hackyness in the case of moving between canonical and
       // noncanonical time
       if (rightnow.UsedCanonicalNow() == aVsyncTimestamp.UsedCanonicalNow()) {
         MOZ_ASSERT(aVsyncTimestamp <= rightnow);
       }
-#else
-      MOZ_ASSERT(aVsyncTimestamp <= TimeStamp::Now());
-#endif
 
       // We might have a problem that we call ~VsyncRefreshDriverTimer() before
       // the scheduled TickRefreshDriver() runs. Check mVsyncRefreshDriverTimer
       // before use.
       if (mVsyncRefreshDriverTimer) {
         mVsyncRefreshDriverTimer->RunRefreshDrivers(aVsyncTimestamp);
       }
 
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -105,21 +105,19 @@
 #include "MediaDecoder.h"
 #include "mozilla/ServoBindings.h"
 #include "mozilla/StaticPresData.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
 #include "mozilla/dom/U2FTokenManager.h"
 #include "mozilla/dom/PointerEventHandler.h"
 #include "mozilla/dom/BlobURLProtocolHandler.h"
+#include "mozilla/Fuzzyfox.h"
 #include "nsThreadManager.h"
 
-#ifdef MOZ_FUZZYFOX
-#include "mozilla/Fuzzyfox.h"
-#endif
 
 using namespace mozilla;
 using namespace mozilla::net;
 using namespace mozilla::dom;
 using namespace mozilla::dom::ipc;
 
 nsrefcnt nsLayoutStatics::sLayoutStaticRefcnt = 0;
 
@@ -284,19 +282,17 @@ nsLayoutStatics::Initialize()
   if (XRE_IsParentProcess()) {
     // On content process we initialize DOMPrefs when PContentChild is fully
     // initialized.
     mozilla::dom::DOMPrefs::Initialize();
   }
 
   nsThreadManager::InitializeShutdownObserver();
 
-#ifdef MOZ_FUZZYFOX
   mozilla::Fuzzyfox::Start();
-#endif
 
   return NS_OK;
 }
 
 void
 nsLayoutStatics::Shutdown()
 {
   // Don't need to shutdown nsWindowMemoryReporter, that will be done by the
--- a/mozglue/misc/TimeStamp.cpp
+++ b/mozglue/misc/TimeStamp.cpp
@@ -3,23 +3,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Implementation of the OS-independent methods of the TimeStamp class
  */
 
+#include "mozilla/Atomics.h"
 #include "mozilla/TimeStamp.h"
 #include <stdio.h>
 #include <string.h>
 
-#ifdef MOZ_FUZZYFOX
-#include "mozilla/Atomics.h"
-#endif
 
 namespace mozilla {
 
 /**
  * Wrapper class used to initialize static data used by the TimeStamp class
  */
 struct TimeStampInitialization
 {
@@ -43,25 +41,23 @@ struct TimeStampInitialization
   };
 
   ~TimeStampInitialization()
   {
     TimeStamp::Shutdown();
   };
 };
 
-#ifdef MOZ_FUZZYFOX
 #ifdef XP_WIN
 static Atomic<uint64_t> sCanonicalGTC;
 static Atomic<uint64_t> sCanonicalQPC;
 static Atomic<bool> sCanonicalHasQPC;
 #else
 static Atomic<uint64_t> sCanonicalNow;
 #endif
-#endif
 
 static TimeStampInitialization sInitOnce;
 
 MFBT_API TimeStamp
 TimeStamp::ProcessCreation(bool* aIsInconsistent)
 {
   if (aIsInconsistent) {
     *aIsInconsistent = false;
@@ -102,17 +98,16 @@ TimeStamp::ProcessCreation(bool* aIsInco
 }
 
 void
 TimeStamp::RecordProcessRestart()
 {
   sInitOnce.mProcessCreation = TimeStamp();
 }
 
-#ifdef MOZ_FUZZYFOX
 MFBT_API TimeStamp
 TimeStamp::NowFuzzy(TimeStampValue aValue)
 {
 #ifdef XP_WIN
   TimeStampValue canonicalNow = TimeStampValue(sCanonicalGTC, sCanonicalQPC, sCanonicalHasQPC);
 #else
   TimeStampValue canonicalNow = sCanonicalNow;
 #endif
@@ -129,11 +124,10 @@ TimeStamp::UpdateFuzzyTimeStamp(TimeStam
   #ifdef XP_WIN
   sCanonicalGTC = aValue.mValue.mGTC;
   sCanonicalQPC = aValue.mValue.mQPC;
   sCanonicalHasQPC = aValue.mValue.mHasQPC;
   #else
   sCanonicalNow = aValue;
   #endif
 }
-#endif
 
 } // namespace mozilla
--- a/mozglue/misc/TimeStamp.h
+++ b/mozglue/misc/TimeStamp.h
@@ -410,19 +410,17 @@ typedef BaseTimeDuration<TimeDurationVal
 class TimeStamp
 {
 public:
   /**
    * Initialize to the "null" moment
    */
   constexpr TimeStamp()
     : mValue(0)
-#ifdef MOZ_FUZZYFOX
     , mUsedCanonicalNow(false)
-#endif
   {}
   // Default copy-constructor and assignment are OK
 
   /**
    * The system timestamps are the same as the TimeStamp
    * retrieved by mozilla::TimeStamp. Since we need this for
    * vsync timestamps, we enable the creation of mozilla::TimeStamps
    * on platforms that support vsync aligned refresh drivers / compositors
@@ -452,19 +450,17 @@ public:
    * Return true if this is not the "null" moment, may be used in tests, e.g.:
    * |if (timestamp) { ... }|
    */
   explicit operator bool() const
   {
     return mValue != 0;
   }
 
-#ifdef MOZ_FUZZYFOX
   bool UsedCanonicalNow() const { return mUsedCanonicalNow; }
-#endif
 
   /**
    * Return a timestamp reflecting the current elapsed system time. This
    * is monotonically increasing (i.e., does not decrease) over the
    * lifetime of this process' XPCOM session.
    *
    * Now() is trying to ensure the best possible precision on each platform,
    * at least one millisecond.
@@ -472,22 +468,20 @@ public:
    * NowLoRes() has been introduced to workaround performance problems of
    * QueryPerformanceCounter on the Windows platform.  NowLoRes() is giving
    * lower precision, usually 15.6 ms, but with very good performance benefit.
    * Use it for measurements of longer times, like >200ms timeouts.
    */
   static TimeStamp Now() { return Now(true); }
   static TimeStamp NowLoRes() { return Now(false); }
 
-#ifdef MOZ_FUZZYFOX
   static TimeStamp NowReally() { return NowReally(true); }
 
   static MFBT_API TimeStamp NowFuzzy(TimeStampValue aValue);
   static MFBT_API void UpdateFuzzyTimeStamp(TimeStamp aValue);
-#endif
 
   /**
    * Return a timestamp representing the time when the current process was
    * created which will be comparable with other timestamps taken with this
    * class. If the actual process creation time is detected to be inconsistent
    * the @a aIsInconsistent parameter will be set to true, the returned
    * timestamp however will still be valid though inaccurate.
    *
@@ -608,33 +602,26 @@ public:
   static MFBT_API void Startup();
   static MFBT_API void Shutdown();
 
 private:
   friend struct IPC::ParamTraits<mozilla::TimeStamp>;
 
   MOZ_IMPLICIT TimeStamp(TimeStampValue aValue)
     : mValue(aValue)
-#ifdef MOZ_FUZZYFOX
     , mUsedCanonicalNow(false)
-#endif
   {}
 
-#ifdef MOZ_FUZZYFOX
   MOZ_IMPLICIT TimeStamp(TimeStampValue aValue, bool aUsedCanonicalNow)
     : mValue(aValue)
     , mUsedCanonicalNow(aUsedCanonicalNow)
   {}
-#endif
 
   static MFBT_API TimeStamp Now(bool aHighResolution);
-
-#ifdef MOZ_FUZZYFOX
   static MFBT_API TimeStamp NowReally(bool aHighResolution);
-#endif
 
   /**
    * Computes the uptime of the current process in microseconds. The result
    * is platform-dependent and needs to be checked against existing timestamps
    * for consistency.
    *
    * @returns The number of microseconds since the calling process was started
    *          or 0 if an error was encountered while computing the uptime
@@ -651,17 +638,15 @@ private:
    * PR_INTERVAL_MAX is set at 100,000 ticks per second. So the minimum
    * time to wrap around is about 2^64/100000 seconds, i.e. about
    * 5,849,424 years.
    *
    * When using a system clock, a value is system dependent.
    */
   TimeStampValue mValue;
 
-#ifdef MOZ_FUZZYFOX
   bool mUsedCanonicalNow;
   friend class Fuzzyfox;
-#endif
 };
 
 } // namespace mozilla
 
 #endif /* mozilla_TimeStamp_h */
--- a/mozglue/misc/TimeStamp_darwin.cpp
+++ b/mozglue/misc/TimeStamp_darwin.cpp
@@ -154,30 +154,24 @@ TimeStamp::Startup()
 void
 TimeStamp::Shutdown()
 {
 }
 
 TimeStamp
 TimeStamp::Now(bool aHighResolution)
 {
-#ifdef MOZ_FUZZYFOX
   return TimeStamp::NowFuzzy(ClockTime());
-#else
-  return TimeStamp(ClockTime());
-#endif
 }
 
-#ifdef MOZ_FUZZYFOX
 TimeStamp
 TimeStamp::NowReally(bool aHighResolution)
 {
   return TimeStamp(ClockTime());
 }
-#endif
 
 // Computes and returns the process uptime in microseconds.
 // Returns 0 if an error was encountered.
 
 uint64_t
 TimeStamp::ComputeProcessUptime()
 {
   struct timeval tv;
--- a/mozglue/misc/TimeStamp_posix.cpp
+++ b/mozglue/misc/TimeStamp_posix.cpp
@@ -197,30 +197,24 @@ TimeStamp::Startup()
 void
 TimeStamp::Shutdown()
 {
 }
 
 TimeStamp
 TimeStamp::Now(bool aHighResolution)
 {
-#ifdef MOZ_FUZZYFOX
   return TimeStamp::NowFuzzy(ClockTimeNs());
-#else
-  return TimeStamp(ClockTimeNs());
-#endif
 }
 
-#ifdef MOZ_FUZZYFOX
 TimeStamp
 TimeStamp::NowReally(bool aHighResolution)
 {
   return TimeStamp(ClockTimeNs());
 }
-#endif
 
 #if defined(XP_LINUX) || defined(ANDROID)
 
 // Calculates the amount of jiffies that have elapsed since boot and up to the
 // starttime value of a specific process as found in its /proc/*/stat file.
 // Returns 0 if an error occurred.
 
 static uint64_t
--- a/mozglue/misc/TimeStamp_windows.cpp
+++ b/mozglue/misc/TimeStamp_windows.cpp
@@ -524,36 +524,30 @@ MFBT_API TimeStamp
 TimeStamp::Now(bool aHighResolution)
 {
   // sUseQPC is volatile
   bool useQPC = (aHighResolution && sUseQPC);
 
   // Both values are in [mt] units.
   ULONGLONG QPC = useQPC ? PerformanceCounter() : uint64_t(0);
   ULONGLONG GTC = ms2mt(GetTickCount64());
-#ifdef MOZ_FUZZYFOX
   return TimeStamp::NowFuzzy(TimeStampValue(GTC, QPC, useQPC));
-#else
-  return TimeStamp(TimeStampValue(GTC, QPC, useQPC));
-#endif
 }
 
-#ifdef MOZ_FUZZYFOX
 MFBT_API TimeStamp
 TimeStamp::NowReally(bool aHighResolution)
 {
   // sUseQPC is volatile
   bool useQPC = (aHighResolution && sUseQPC);
 
   // Both values are in [mt] units.
   ULONGLONG QPC = useQPC ? PerformanceCounter() : uint64_t(0);
   ULONGLONG GTC = ms2mt(GetTickCount64());
   return TimeStamp(TimeStampValue(GTC, QPC, useQPC));
 }
-#endif
 
 // Computes and returns the process uptime in microseconds.
 // Returns 0 if an error was encountered.
 
 MFBT_API uint64_t
 TimeStamp::ComputeProcessUptime()
 {
   SYSTEMTIME nowSys;
--- a/netwerk/protocol/http/moz.build
+++ b/netwerk/protocol/http/moz.build
@@ -58,16 +58,17 @@ SOURCES += [
 UNIFIED_SOURCES += [
     'AltDataOutputStreamChild.cpp',
     'AltDataOutputStreamParent.cpp',
     'AlternateServices.cpp',
     'ASpdySession.cpp',
     'BackgroundChannelRegistrar.cpp',
     'CacheControlParser.cpp',
     'ConnectionDiagnostics.cpp',
+    'DelayHttpChannelQueue.cpp',
     'Http2Compression.cpp',
     'Http2Push.cpp',
     'Http2Session.cpp',
     'Http2Stream.cpp',
     'HttpAuthUtils.cpp',
     'HttpBackgroundChannelChild.cpp',
     'HttpBackgroundChannelParent.cpp',
     'HttpBaseChannel.cpp',
@@ -95,21 +96,16 @@ UNIFIED_SOURCES += [
     'nsHttpResponseHead.cpp',
     'nsHttpTransaction.cpp',
     'nsServerTiming.cpp',
     'NullHttpChannel.cpp',
     'NullHttpTransaction.cpp',
     'TunnelUtils.cpp',
 ]
 
-if CONFIG['MOZ_FUZZYFOX']:
-    UNIFIED_SOURCES += [
-        'DelayHttpChannelQueue.cpp',
-    ]
-
 # These files cannot be built in unified mode because of OS X headers.
 SOURCES += [
     'nsHttpHandler.cpp',
 ]
 
 IPDL_SOURCES += [
     'PAltDataOutputStream.ipdl',
     'PHttpBackgroundChannel.ipdl',
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6011,35 +6011,31 @@ nsHttpChannel::AsyncOpen(nsIStreamListen
     }
 
     mIsPending = true;
     mWasOpened = true;
 
     mListener = listener;
     mListenerContext = context;
 
-#ifdef MOZ_FUZZYFOX
     // PauseTask/DelayHttpChannel queuing
     if (!DelayHttpChannelQueue::AttemptQueueChannel(this)) {
         // If failed, the channel must continue.
         AsyncOpenFinal(TimeStamp::Now());
     }
 
     return NS_OK;
 }
 
 nsresult
 nsHttpChannel::AsyncOpenFinal(TimeStamp aTimeStamp)
 {
     // Added due to PauseTask/DelayHttpChannel
     nsresult rv;
     TimeStamp now = aTimeStamp;
-#else
-    TimeStamp now = TimeStamp::Now();
-#endif
 
     if (mLoadGroup)
         mLoadGroup->AddRequest(this, nullptr);
 
     // record asyncopen time unconditionally and clear it if we
     // don't want it after OnModifyRequest() weighs in. But waiting for
     // that to complete would mean we don't include proxy resolution in the
     // timing.
--- a/netwerk/protocol/http/nsHttpChannel.h
+++ b/netwerk/protocol/http/nsHttpChannel.h
@@ -27,20 +27,17 @@
 #include "AutoClose.h"
 #include "nsIStreamListener.h"
 #include "nsISupportsPrimitives.h"
 #include "nsICorsPreflightCallback.h"
 #include "AlternateServices.h"
 #include "nsIRaceCacheWithNetwork.h"
 #include "mozilla/extensions/PStreamFilterParent.h"
 #include "mozilla/Mutex.h"
-
-#ifdef MOZ_FUZZYFOX
 #include "DelayHttpChannelQueue.h"
-#endif
 
 class nsDNSPrefetch;
 class nsICancelable;
 class nsIHttpChannelAuthProvider;
 class nsInputStreamPump;
 class nsISSLStatus;
 
 namespace mozilla { namespace net {
@@ -200,19 +197,17 @@ public:
     HttpChannelSecurityWarningReporter* GetWarningReporter();
 public: /* internal necko use only */
 
     uint32_t GetRequestTime() const
     {
         return mRequestTime;
     }
 
-#ifdef MOZ_FUZZYFOX
     nsresult AsyncOpenFinal(TimeStamp aTimeStamp);
-#endif
 
     MOZ_MUST_USE nsresult OpenCacheEntry(bool usingSSL);
     MOZ_MUST_USE nsresult OpenCacheEntryInternal(bool isHttps,
                                                  nsIApplicationCache *applicationCache,
                                                  bool noAppCache);
     MOZ_MUST_USE nsresult ContinueConnect();
 
     MOZ_MUST_USE nsresult StartRedirectChannelToURI(nsIURI *, uint32_t);
--- a/toolkit/components/moz.build
+++ b/toolkit/components/moz.build
@@ -30,16 +30,17 @@ DIRS += [
     'crashmonitor',
     'diskspacewatcher',
     'downloads',
     'enterprisepolicies',
     'extensions',
     'filewatcher',
     'finalizationwitness',
     'find',
+    'fuzzyfox',
     'jsoncpp/src/lib_json',
     'lz4',
     'mediasniffer',
     'microformats',
     'mozintl',
     'mozprotocol',
     'osfile',
     'parentalcontrols',
@@ -72,19 +73,16 @@ DIRS += [
     'viewconfig',
     'viewsource',
     'windowcreator',
     'windowwatcher',
     'workerloader',
     'xulstore'
 ]
 
-if CONFIG['MOZ_FUZZYFOX']:
-    DIRS += ['fuzzyfox']
-
 if CONFIG['MOZ_BUILD_APP'] != 'mobile/android':
     DIRS += ['narrate'];
 
     if CONFIG['NS_PRINTING']:
         DIRS += ['printing']
 
 if CONFIG['BUILD_CTYPES']:
     DIRS += ['ctypes']