Browse Source

Bug 1455408 rebase

Ian Neal 4 years ago
parent
commit
a67f3a378c

+ 0 - 3
comm-esr60/mozilla-esr60/patches/series

@@ -217,9 +217,6 @@ NOBUG-BACKOUT-1439860-60.patch
 TOP-9999999-rust133-257.patch
 TOP-9999999-fixlangpack-257.patch
 mozilla-esr60-top-nonexisting.patch
-1455408-1-61a1.patch
-1455408-2-61a1.patch
-1455408-3-61a1.patch
 1523665-66.patch
 1529902-67a1.patch
 1444506-1-61a1.patch

+ 60 - 65
comm-esr60/mozilla-esr60/patches/1455408-1-61a1.patch → rel-257/mozilla-esr60/patches/1455408-1-61a1.patch

@@ -2,7 +2,7 @@
 # User Ryan Hunt <rhunt@eqrion.net>
 # Date 1524166569 18000
 # Node ID 070ece578a860d1b471b21e0208b883fef7f5677
-# Parent  a87db98d41170b9e909955cc1dff7ca96098e05b
+# Parent  6b76f54228a320d3458de667d6c251db111e3684
 Bug 1455408 - Remove dead code in ImageBridge that was used for changing thread priority. r=kats
 
 MozReview-Commit-ID: 8sYuUXI8fz4
@@ -10,7 +10,7 @@ MozReview-Commit-ID: 8sYuUXI8fz4
 diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp
 --- a/gfx/layers/ipc/ImageBridgeChild.cpp
 +++ b/gfx/layers/ipc/ImageBridgeChild.cpp
-@@ -548,21 +548,16 @@ ImageBridgeChild::EndTransaction()
+@@ -448,18 +448,16 @@ void ImageBridgeChild::EndTransaction() 
    }
  
    if (!SendUpdate(cset, mTxn->mDestroyedActors, GetFwdTransactionId())) {
@@ -19,20 +19,17 @@ diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChi
    }
  }
  
--void
--ImageBridgeChild::SendImageBridgeThreadId()
--{
--}
+-void ImageBridgeChild::SendImageBridgeThreadId() {}
 -
- bool
- ImageBridgeChild::InitForContent(Endpoint<PImageBridgeChild>&& aEndpoint, uint32_t aNamespace)
- {
+ bool ImageBridgeChild::InitForContent(Endpoint<PImageBridgeChild>&& aEndpoint,
+                                       uint32_t aNamespace) {
    MOZ_ASSERT(NS_IsMainThread());
  
    gfxPlatform::GetPlatform();
  
    if (!sImageBridgeChildThread) {
-@@ -610,31 +605,29 @@ ImageBridgeChild::Bind(Endpoint<PImageBr
+     sImageBridgeChildThread = new Thread("ImageBridgeChild");
+@@ -501,29 +499,27 @@ void ImageBridgeChild::Bind(Endpoint<PIm
    if (!aEndpoint.Bind(this)) {
      return;
    }
@@ -44,11 +41,9 @@ diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChi
 -  SendImageBridgeThreadId();
  }
  
- void
- ImageBridgeChild::BindSameProcess(RefPtr<ImageBridgeParent> aParent)
- {
-   MessageLoop *parentMsgLoop = aParent->GetMessageLoop();
-   ipc::MessageChannel *parentChannel = aParent->GetIPCChannel();
+ void ImageBridgeChild::BindSameProcess(RefPtr<ImageBridgeParent> aParent) {
+   MessageLoop* parentMsgLoop = aParent->GetMessageLoop();
+   ipc::MessageChannel* parentChannel = aParent->GetIPCChannel();
    Open(parentChannel, parentMsgLoop, mozilla::ipc::ChildSide);
  
    // This reference is dropped in DeallocPImageBridgeChild.
@@ -58,16 +53,16 @@ diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChi
 -  SendImageBridgeThreadId();
  }
  
- /* static */ void
- ImageBridgeChild::ShutDown()
- {
+ /* static */ void ImageBridgeChild::ShutDown() {
    MOZ_ASSERT(NS_IsMainThread());
  
    ShutdownSingleton();
+ 
+   delete sImageBridgeChildThread;
 diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgeParent.cpp
 --- a/gfx/layers/ipc/ImageBridgeParent.cpp
 +++ b/gfx/layers/ipc/ImageBridgeParent.cpp
-@@ -57,17 +57,16 @@ ImageBridgeParent::Setup()
+@@ -57,17 +57,16 @@ CompositorThreadHolder* GetCompositorThr
      sImageBridgesLock = new Monitor("ImageBridges");
      mozilla::ClearOnShutdown(&sImageBridgesLock);
    }
@@ -75,28 +70,27 @@ diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgePa
  
  ImageBridgeParent::ImageBridgeParent(MessageLoop* aLoop,
                                       ProcessId aChildProcessId)
-   : mMessageLoop(aLoop)
--  , mSetChildThreadPriority(false)
-   , mClosed(false)
- {
+     : mMessageLoop(aLoop),
+-      mSetChildThreadPriority(false),
+       mClosed(false),
+       mCompositorThreadHolder(CompositorThreadHolder::GetSingleton()) {
    MOZ_ASSERT(NS_IsMainThread());
+   SetOtherProcessId(aChildProcessId);
+ }
+ 
+ ImageBridgeParent::~ImageBridgeParent() {}
  
-   // creates the map only if it has not been created already, so it is safe
-   // with several bridges
-   {
-     MonitorAutoLock lock(*sImageBridgesLock);
-@@ -133,27 +132,16 @@ ImageBridgeParent::ActorDestroy(ActorDes
-   // It is very important that this method gets called at shutdown (be it a clean
-   // or an abnormal shutdown), because DeferredDestroy is what clears mSelfRef.
-   // If mSelfRef is not null and ActorDestroy is not called, the ImageBridgeParent
-   // is leaked which causes the CompositorThreadHolder to be leaked and
-   // CompsoitorParent's shutdown ends up spinning the event loop forever, waiting
-   // for the compositor thread to terminate.
+@@ -147,26 +146,16 @@ void ImageBridgeParent::ActorDestroy(Act
+   // It is very important that this method gets called at shutdown (be it a
+   // clean or an abnormal shutdown), because DeferredDestroy is what clears
+   // mSelfRef. If mSelfRef is not null and ActorDestroy is not called, the
+   // ImageBridgeParent is leaked which causes the CompositorThreadHolder to be
+   // leaked and CompsoitorParent's shutdown ends up spinning the event loop
+   // forever, waiting for the compositor thread to terminate.
  }
  
--mozilla::ipc::IPCResult
--ImageBridgeParent::RecvImageBridgeThreadId(const PlatformThreadId& aThreadId)
--{
+-mozilla::ipc::IPCResult ImageBridgeParent::RecvImageBridgeThreadId(
+-    const PlatformThreadId& aThreadId) {
 -  MOZ_ASSERT(!mSetChildThreadPriority);
 -  if (mSetChildThreadPriority) {
 -    return IPC_FAIL_NO_REASON(this);
@@ -105,38 +99,39 @@ diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgePa
 -  return IPC_OK();
 -}
 -
- class MOZ_STACK_CLASS AutoImageBridgeParentAsyncMessageSender
- {
- public:
-   explicit AutoImageBridgeParentAsyncMessageSender(ImageBridgeParent* aImageBridge,
-                                                    InfallibleTArray<OpDestroy>* aToDestroy = nullptr)
-     : mImageBridge(aImageBridge)
-     , mToDestroy(aToDestroy)
-   {
+ class MOZ_STACK_CLASS AutoImageBridgeParentAsyncMessageSender {
+  public:
+   explicit AutoImageBridgeParentAsyncMessageSender(
+       ImageBridgeParent* aImageBridge,
+       InfallibleTArray<OpDestroy>* aToDestroy = nullptr)
+       : mImageBridge(aImageBridge), mToDestroy(aToDestroy) {
+     mImageBridge->SetAboutToSendAsyncMessages();
+   }
 diff --git a/gfx/layers/ipc/ImageBridgeParent.h b/gfx/layers/ipc/ImageBridgeParent.h
 --- a/gfx/layers/ipc/ImageBridgeParent.h
 +++ b/gfx/layers/ipc/ImageBridgeParent.h
-@@ -69,17 +69,16 @@ public:
-   virtual void NotifyNotUsed(PTextureParent* aTexture, uint64_t aTransactionId) override;
+@@ -69,18 +69,16 @@ class ImageBridgeParent final : public P
+       const InfallibleTArray<AsyncParentMessageData>& aMessage) override;
  
-   virtual base::ProcessId GetChildProcessId() override
-   {
-     return OtherPid();
-   }
+   virtual void NotifyNotUsed(PTextureParent* aTexture,
+                              uint64_t aTransactionId) override;
+ 
+   virtual base::ProcessId GetChildProcessId() override { return OtherPid(); }
  
    // PImageBridge
--  virtual mozilla::ipc::IPCResult RecvImageBridgeThreadId(const PlatformThreadId& aThreadId) override;
-   virtual mozilla::ipc::IPCResult RecvInitReadLocks(ReadLockArray&& aReadLocks) override;
-   virtual mozilla::ipc::IPCResult RecvUpdate(EditArray&& aEdits, OpDestroyArray&& aToDestroy,
-                                           const uint64_t& aFwdTransactionId) override;
- 
-   virtual PTextureParent* AllocPTextureParent(const SurfaceDescriptor& aSharedData,
-                                               const LayersBackend& aLayersBackend,
-                                               const TextureFlags& aFlags,
-                                               const uint64_t& aSerial,
-@@ -127,17 +126,16 @@ protected:
- 
- private:
+-  virtual mozilla::ipc::IPCResult RecvImageBridgeThreadId(
+-      const PlatformThreadId& aThreadId) override;
+   virtual mozilla::ipc::IPCResult RecvInitReadLocks(
+       ReadLockArray&& aReadLocks) override;
+   virtual mozilla::ipc::IPCResult RecvUpdate(
+       EditArray&& aEdits, OpDestroyArray&& aToDestroy,
+       const uint64_t& aFwdTransactionId) override;
+ 
+   virtual PTextureParent* AllocPTextureParent(
+       const SurfaceDescriptor& aSharedData, const ReadLockDescriptor& aReadLock,
+@@ -135,17 +133,16 @@ class ImageBridgeParent final : public P
+   static void ShutdownInternal();
+ 
    void DeferredDestroy();
    MessageLoop* mMessageLoop;
    // This keeps us alive until ActorDestroy(), at which point we do a
@@ -149,9 +144,9 @@ diff --git a/gfx/layers/ipc/ImageBridgeParent.h b/gfx/layers/ipc/ImageBridgePare
    /**
     * Map of all living ImageBridgeParent instances
     */
-   static std::map<base::ProcessId, ImageBridgeParent*> sImageBridges;
+   typedef std::map<base::ProcessId, ImageBridgeParent*> ImageBridgeMap;
+   static ImageBridgeMap sImageBridges;
  
-   RefPtr<CompositorThreadHolder> mCompositorThreadHolder;
 diff --git a/gfx/layers/ipc/PImageBridge.ipdl b/gfx/layers/ipc/PImageBridge.ipdl
 --- a/gfx/layers/ipc/PImageBridge.ipdl
 +++ b/gfx/layers/ipc/PImageBridge.ipdl

+ 15 - 16
comm-esr60/mozilla-esr60/patches/1455408-2-61a1.patch → rel-257/mozilla-esr60/patches/1455408-2-61a1.patch

@@ -2,7 +2,7 @@
 # User Ryan Hunt <rhunt@eqrion.net>
 # Date 1524167303 18000
 # Node ID c1e5abfc4b6a52d25aed3381b4beb64f8ea66c67
-# Parent  e7c9f480c16b806abc5836ade9fe895af6f3144d
+# Parent  4312fc858a2ad291630941911a78fd8ce4275233
 Bug 1455408 - Remove dead code from CompositorBridgeParent that was used for changing thread priority. r=kats
 
 MozReview-Commit-ID: CXELmNfZoaN
@@ -10,41 +10,40 @@ MozReview-Commit-ID: CXELmNfZoaN
 diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp
 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp
 +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
-@@ -278,21 +278,16 @@ CompositorBridgeParent::Shutdown()
+@@ -243,20 +243,16 @@ void CompositorBridgeParent::Shutdown() 
+   sCompositorMap = nullptr;
+ }
  
- void
- CompositorBridgeParent::FinishShutdown()
- {
+ void CompositorBridgeParent::FinishShutdown() {
    // TODO: this should be empty by now...
    sIndirectLayerTrees.clear();
  }
  
--static void SetThreadPriority()
--{
+-static void SetThreadPriority() {
 -  hal::SetCurrentThreadPriority(hal::THREAD_PRIORITY_COMPOSITOR);
 -}
 -
  #ifdef COMPOSITOR_PERFORMANCE_WARNING
- static int32_t
- CalculateCompositionFrameRate()
- {
+ static int32_t CalculateCompositionFrameRate() {
    // Used when layout.frame_rate is -1. Needs to be kept in sync with
    // DEFAULT_FRAME_RATE in nsRefreshDriver.cpp.
    // TODO: This should actually return the vsync rate.
    const int32_t defaultFrameRate = 60;
-@@ -383,19 +378,16 @@ CompositorBridgeParent::Initialize()
+   int32_t compositionFrameRatePref = gfxPrefs::LayersCompositionFrameRate();
+   if (compositionFrameRatePref < 0) {
+@@ -338,19 +334,16 @@ void CompositorBridgeParent::Initialize(
    mCompositorBridgeID = 0;
    // FIXME: This holds on the the fact that right now the only thing that
    // can destroy this instance is initialized on the compositor thread after
    // this task has been processed.
    MOZ_ASSERT(CompositorLoop());
-   CompositorLoop()->PostTask(NewRunnableFunction(&AddCompositor,
-                                                  this, &mCompositorBridgeID));
+   CompositorLoop()->PostTask(NewRunnableFunction(
+       "AddCompositorRunnable", &AddCompositor, this, &mCompositorBridgeID));
  
--  CompositorLoop()->PostTask(NewRunnableFunction(SetThreadPriority));
--
+-  CompositorLoop()->PostTask(
+-      NewRunnableFunction("SetThreadPriorityRunnable", SetThreadPriority));
 -
-   { // scope lock
+   {  // scope lock
      MonitorAutoLock lock(*sIndirectLayerTreesLock);
      sIndirectLayerTrees[mRootLayerTreeID].mParent = this;
    }

+ 82 - 94
comm-esr60/mozilla-esr60/patches/1455408-3-61a1.patch → rel-257/mozilla-esr60/patches/1455408-3-61a1.patch

@@ -2,7 +2,7 @@
 # User Ryan Hunt <rhunt@eqrion.net>
 # Date 1524167282 18000
 # Node ID 43fb3472db5f3c1e811697993316cfd4e434cfdb
-# Parent  bb94ed972a9fd86ba96e75dd0ad86a1c9090df01
+# Parent  2511fcd35299373476185e2db2ebfd704bc60b0b
 Bug 1455408 - Remove thread priority suppport from HAL as it isn't used any longer. r=gsvelto
 
 MozReview-Commit-ID: KJ2byDuYWr9
@@ -10,48 +10,42 @@ MozReview-Commit-ID: KJ2byDuYWr9
 diff --git a/hal/Hal.cpp b/hal/Hal.cpp
 --- a/hal/Hal.cpp
 +++ b/hal/Hal.cpp
-@@ -591,29 +591,16 @@ SetProcessPrioritySupported()
- void
- SetProcessPriority(int aPid, ProcessPriority aPriority)
- {
+@@ -511,25 +511,16 @@ bool SetProcessPrioritySupported() {
+ }
+ 
+ void SetProcessPriority(int aPid, ProcessPriority aPriority) {
    // n.b. The sandboxed implementation crashes; SetProcessPriority works only
    // from the main process.
    PROXY_IF_SANDBOXED(SetProcessPriority(aPid, aPriority));
  }
  
--void
--SetCurrentThreadPriority(hal::ThreadPriority aThreadPriority)
--{
+-void SetCurrentThreadPriority(hal::ThreadPriority aThreadPriority) {
 -  PROXY_IF_SANDBOXED(SetCurrentThreadPriority(aThreadPriority));
 -}
 -
--void
--SetThreadPriority(PlatformThreadId aThreadId,
--                  hal::ThreadPriority aThreadPriority)
--{
+-void SetThreadPriority(PlatformThreadId aThreadId,
+-                       hal::ThreadPriority aThreadPriority) {
 -  PROXY_IF_SANDBOXED(SetThreadPriority(aThreadId, aThreadPriority));
 -}
 -
  // From HalTypes.h.
- const char*
- ProcessPriorityToString(ProcessPriority aPriority)
- {
+ const char* ProcessPriorityToString(ProcessPriority aPriority) {
    switch (aPriority) {
-   case PROCESS_PRIORITY_MASTER:
-     return "MASTER";
-   case PROCESS_PRIORITY_PREALLOC:
-@@ -631,22 +618,10 @@ ProcessPriorityToString(ProcessPriority 
-   case PROCESS_PRIORITY_UNKNOWN:
-     return "UNKNOWN";
-   default:
-     MOZ_ASSERT(false);
-     return "???";
+     case PROCESS_PRIORITY_MASTER:
+       return "MASTER";
+     case PROCESS_PRIORITY_PREALLOC:
+       return "PREALLOC";
+     case PROCESS_PRIORITY_FOREGROUND_HIGH:
+@@ -545,26 +536,16 @@ const char* ProcessPriorityToString(Proc
+     case PROCESS_PRIORITY_UNKNOWN:
+       return "UNKNOWN";
+     default:
+       MOZ_ASSERT(false);
+       return "???";
    }
  }
  
--const char *
--ThreadPriorityToString(ThreadPriority aPriority)
--{
+-const char* ThreadPriorityToString(ThreadPriority aPriority) {
 -  switch (aPriority) {
 -    case THREAD_PRIORITY_COMPOSITOR:
 -      return "COMPOSITOR";
@@ -61,13 +55,18 @@ diff --git a/hal/Hal.cpp b/hal/Hal.cpp
 -  }
 -}
 -
- } // namespace hal
- } // namespace mozilla
+ void StartDiskSpaceWatcher() {
+   AssertMainProcess();
+   AssertMainThread();
+   PROXY_IF_SANDBOXED(StartDiskSpaceWatcher());
+ }
+ 
+ void StopDiskSpaceWatcher() {
+   AssertMainProcess();
 diff --git a/hal/Hal.h b/hal/Hal.h
 --- a/hal/Hal.h
 +++ b/hal/Hal.h
-@@ -271,32 +271,16 @@ bool SetProcessPrioritySupported();
-  * Set the priority of the given process.
+@@ -274,31 +274,16 @@ bool SetProcessPrioritySupported();
   *
   * Exactly what this does will vary between platforms.  On *nix we might give
   * background processes higher nice values.  On other platforms, we might
@@ -75,8 +74,7 @@ diff --git a/hal/Hal.h b/hal/Hal.h
   */
  void SetProcessPriority(int aPid, hal::ProcessPriority aPriority);
  
--
--/**
+ /**
 - * Set the current thread's priority to appropriate platform-specific value for
 - * given functionality. Instead of providing arbitrary priority numbers you
 - * must specify a type of function like THREAD_PRIORITY_COMPOSITOR.
@@ -91,18 +89,19 @@ diff --git a/hal/Hal.h b/hal/Hal.h
 -void SetThreadPriority(PlatformThreadId aThreadId,
 -                       hal::ThreadPriority aThreadPriority);
 -
- } // namespace MOZ_HAL_NAMESPACE
- } // namespace mozilla
- 
- #ifdef MOZ_DEFINED_HAL_NAMESPACE
- # undef MOZ_DEFINED_HAL_NAMESPACE
- # undef MOZ_HAL_NAMESPACE
- #endif
+-/**
+  * Start monitoring disk space for low space situations.
+  *
+  * This API is currently only allowed to be used from the main process.
+  */
+ void StartDiskSpaceWatcher();
  
+ /**
+  * Stop monitoring disk space for low space situations.
 diff --git a/hal/HalTypes.h b/hal/HalTypes.h
 --- a/hal/HalTypes.h
 +++ b/hal/HalTypes.h
-@@ -35,48 +35,26 @@ enum ProcessPriority {
+@@ -35,43 +35,25 @@ enum ProcessPriority {
    // CurrentProcessIsForeground().
    PROCESS_PRIORITY_FOREGROUND,
    PROCESS_PRIORITY_FOREGROUND_HIGH,
@@ -111,16 +110,13 @@ diff --git a/hal/HalTypes.h b/hal/HalTypes.h
  };
  
  /**
-- * Values that can be passed to hal::SetCurrentThreadPriority().  These should be
-- * functional in nature, such as COMPOSITOR, instead of levels, like LOW/HIGH.
-- * This allows us to tune our priority scheme for the system in one place such
-- * that it makes sense holistically for the overall operating system.  On gonk
-- * or android we may want different priority schemes than on windows, etc.
+- * Values that can be passed to hal::SetCurrentThreadPriority().  These should
+- * be functional in nature, such as COMPOSITOR, instead of levels, like
+- * LOW/HIGH. This allows us to tune our priority scheme for the system in one
+- * place such that it makes sense holistically for the overall operating system.
+- * On android we may want different priority schemes than on windows, etc.
 - */
--enum ThreadPriority {
--  THREAD_PRIORITY_COMPOSITOR,
--  NUM_THREAD_PRIORITY
--};
+-enum ThreadPriority { THREAD_PRIORITY_COMPOSITOR, NUM_THREAD_PRIORITY };
 -
 -/**
   * Convert a ProcessPriority enum value to a string.  The strings returned by
@@ -129,8 +125,7 @@ diff --git a/hal/HalTypes.h b/hal/HalTypes.h
   * If you pass an unknown process priority, we fatally assert in debug
   * builds and otherwise return "???".
   */
- const char*
- ProcessPriorityToString(ProcessPriority aPriority);
+ const char* ProcessPriorityToString(ProcessPriority aPriority);
  
  /**
 - * Convert a ThreadPriority enum value to a string.  The strings returned by
@@ -139,23 +134,22 @@ diff --git a/hal/HalTypes.h b/hal/HalTypes.h
 - * If you pass an unknown process priority, we assert in debug builds
 - * and otherwise return "???".
 - */
--const char *
--ThreadPriorityToString(ThreadPriority aPriority);
+-const char* ThreadPriorityToString(ThreadPriority aPriority);
 -
 -/**
   * Used by ModifyWakeLock
   */
  enum WakeLockControl {
    WAKE_LOCK_REMOVE_ONE = -1,
-   WAKE_LOCK_NO_CHANGE  = 0,
-   WAKE_LOCK_ADD_ONE    = 1,
+   WAKE_LOCK_NO_CHANGE = 0,
+   WAKE_LOCK_ADD_ONE = 1,
    NUM_WAKE_LOCK
  };
 diff --git a/hal/fallback/FallbackThreadPriority.cpp b/hal/fallback/FallbackThreadPriority.cpp
 deleted file mode 100644
 --- a/hal/fallback/FallbackThreadPriority.cpp
 +++ /dev/null
-@@ -1,29 +0,0 @@
+@@ -1,24 +0,0 @@
 -/* 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/. */
@@ -168,34 +162,29 @@ deleted file mode 100644
 -namespace mozilla {
 -namespace hal_impl {
 -
--void
--SetCurrentThreadPriority(ThreadPriority aPriority)
--{
+-void SetCurrentThreadPriority(ThreadPriority aPriority) {
 -  HAL_LOG("FallbackThreadPriority - SetCurrentThreadPriority(%s)\n",
 -          ThreadPriorityToString(aPriority));
 -}
 -
--void
--SetThreadPriority(PlatformThreadId aThreadId,
--                  ThreadPriority aPriority)
--{
--  HAL_LOG("FallbackThreadPriority - SetThreadPriority(%d, %s)\n",
--          aThreadId, ThreadPriorityToString(aPriority));
+-void SetThreadPriority(PlatformThreadId aThreadId, ThreadPriority aPriority) {
+-  HAL_LOG("FallbackThreadPriority - SetThreadPriority(%d, %s)\n", aThreadId,
+-          ThreadPriorityToString(aPriority));
 -}
 -
--} // namespace hal_impl
--} // namespace mozilla
+-}  // namespace hal_impl
+-}  // namespace mozilla
 diff --git a/hal/moz.build b/hal/moz.build
 --- a/hal/moz.build
 +++ b/hal/moz.build
-@@ -93,17 +93,16 @@ else:
-         'fallback/FallbackScreenConfiguration.cpp',
+@@ -94,17 +94,16 @@ else:
          'fallback/FallbackSensor.cpp',
          'fallback/FallbackVibration.cpp',
      ]
  
- # Fallbacks for backends implemented on Gonk only.
+ # Fallbacks for backends no longer implemented.
  UNIFIED_SOURCES += [
+     'fallback/FallbackDiskSpaceWatcher.cpp',
      'fallback/FallbackProcessPriority.cpp',
 -    'fallback/FallbackThreadPriority.cpp',
  ]
@@ -209,33 +198,32 @@ diff --git a/hal/moz.build b/hal/moz.build
 diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp
 --- a/hal/sandbox/SandboxHal.cpp
 +++ b/hal/sandbox/SandboxHal.cpp
-@@ -202,29 +202,16 @@ SetProcessPriority(int aPid, ProcessPrio
+@@ -137,28 +137,16 @@ bool SetAlarm(int32_t aSeconds, int32_t 
+ void SetProcessPriority(int aPid, ProcessPriority aPriority) {
+   MOZ_CRASH("Only the main process may set processes' priorities.");
+ }
  
- bool
- SetProcessPrioritySupported()
- {
-   NS_RUNTIMEABORT("Only the main process may call SetProcessPrioritySupported().");
-   return false;
+ bool SetProcessPrioritySupported() {
+   MOZ_CRASH("Only the main process may call SetProcessPrioritySupported().");
  }
  
--void
--SetCurrentThreadPriority(ThreadPriority aThreadPriority)
--{
--  NS_RUNTIMEABORT("Setting current thread priority cannot be called from sandboxed contexts.");
+-void SetCurrentThreadPriority(ThreadPriority aThreadPriority) {
+-  MOZ_CRASH(
+-      "Setting current thread priority cannot be called from sandboxed "
+-      "contexts.");
 -}
 -
--void
--SetThreadPriority(PlatformThreadId aThreadId,
--                  ThreadPriority aThreadPriority)
--{
--  NS_RUNTIMEABORT("Setting thread priority cannot be called from sandboxed contexts.");
+-void SetThreadPriority(PlatformThreadId aThreadId,
+-                       ThreadPriority aThreadPriority) {
+-  MOZ_CRASH(
+-      "Setting thread priority cannot be called from sandboxed contexts.");
 -}
 -
- class HalParent : public PHalParent
-                 , public BatteryObserver
-                 , public NetworkObserver
-                 , public ISensorObserver
-                 , public WakeLockObserver
-                 , public ScreenConfigurationObserver
- {
- public:
+ void StartDiskSpaceWatcher() {
+   MOZ_CRASH("StartDiskSpaceWatcher() can't be called from sandboxed contexts.");
+ }
+ 
+ void StopDiskSpaceWatcher() {
+   MOZ_CRASH("StopDiskSpaceWatcher() can't be called from sandboxed contexts.");
+ }
+ 

+ 17 - 17
rel-257/mozilla-esr60/patches/1488401-64a1.patch

@@ -2,7 +2,7 @@
 # User Gabriele Svelto <gsvelto@mozilla.com>
 # Date 1536820851 0
 # Node ID 3206c9b8db975f6b30bc4ee1a70402ccfdc68e36
-# Parent  6b76f54228a320d3458de667d6c251db111e3684
+# Parent  b00696162de9955a420e60f1aea7040587a4da96
 Bug 1488401 - Remove the remnants of the DiskSpaceWatcher r=asuth,janv,smaug
 
 Differential Revision: https://phabricator.services.mozilla.com/D4933
@@ -1983,9 +1983,9 @@ diff --git a/hal/Hal.cpp b/hal/Hal.cpp
  }
  
  StaticAutoPtr<WindowIdentifier::IDArrayType> gLastIDToVibrate;
-@@ -555,22 +551,10 @@ const char* ThreadPriorityToString(Threa
-     case THREAD_PRIORITY_COMPOSITOR:
-       return "COMPOSITOR";
+@@ -536,22 +532,10 @@ const char* ProcessPriorityToString(Proc
+     case PROCESS_PRIORITY_UNKNOWN:
+       return "UNKNOWN";
      default:
        MOZ_ASSERT(false);
        return "???";
@@ -2009,14 +2009,14 @@ diff --git a/hal/Hal.cpp b/hal/Hal.cpp
 diff --git a/hal/Hal.h b/hal/Hal.h
 --- a/hal/Hal.h
 +++ b/hal/Hal.h
-@@ -288,30 +288,16 @@ void SetCurrentThreadPriority(hal::Threa
- /**
-  * Set a thread priority to appropriate platform-specific value for
-  * given functionality. Instead of providing arbitrary priority numbers you
-  * must specify a type of function like THREAD_PRIORITY_COMPOSITOR.
+@@ -273,30 +273,16 @@ bool SetProcessPrioritySupported();
+  * Set the priority of the given process.
+  *
+  * Exactly what this does will vary between platforms.  On *nix we might give
+  * background processes higher nice values.  On other platforms, we might
+  * ignore this call entirely.
   */
- void SetThreadPriority(PlatformThreadId aThreadId,
-                        hal::ThreadPriority aThreadPriority);
+ void SetProcessPriority(int aPid, hal::ProcessPriority aPriority);
  
 -/**
 - * Start monitoring disk space for low space situations.
@@ -2072,23 +2072,23 @@ diff --git a/hal/moz.build b/hal/moz.build
  UNIFIED_SOURCES += [
 -    'fallback/FallbackDiskSpaceWatcher.cpp',
      'fallback/FallbackProcessPriority.cpp',
-     'fallback/FallbackThreadPriority.cpp',
  ]
  
  # Fallbacks for backends implemented on Android only.
  if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
      UNIFIED_SOURCES += [
          'fallback/FallbackNetwork.cpp',
+     ]
 diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp
 --- a/hal/sandbox/SandboxHal.cpp
 +++ b/hal/sandbox/SandboxHal.cpp
-@@ -149,24 +149,16 @@ void SetCurrentThreadPriority(ThreadPrio
+@@ -137,24 +137,16 @@ bool SetAlarm(int32_t aSeconds, int32_t 
+ void SetProcessPriority(int aPid, ProcessPriority aPriority) {
+   MOZ_CRASH("Only the main process may set processes' priorities.");
  }
  
- void SetThreadPriority(PlatformThreadId aThreadId,
-                        ThreadPriority aThreadPriority) {
-   MOZ_CRASH(
-       "Setting thread priority cannot be called from sandboxed contexts.");
+ bool SetProcessPrioritySupported() {
+   MOZ_CRASH("Only the main process may call SetProcessPrioritySupported().");
  }
  
 -void StartDiskSpaceWatcher() {

+ 3 - 0
rel-257/mozilla-esr60/patches/series

@@ -18,5 +18,8 @@ NOBUG-0c5f5c2e2a86-64a1.patch
 1446809-9-61a1.patch
 1477678-63a1.patch
 1447873-61a1.patch
+1455408-1-61a1.patch
+1455408-2-61a1.patch
+1455408-3-61a1.patch
 1488401-64a1.patch
 1502747-65a1.patch