Browse Source

More mozilla rel-257 patches

Ian Neal 4 years ago
parent
commit
2fef01cbd2

+ 0 - 324
comm-esr60/mozilla-esr60/patches/1426129.patch

@@ -1,324 +0,0 @@
-# HG changeset patch
-# User Paul Adenot <paul@paul.cx>
-# Date 1519403727 -3600
-# Node ID ee3fdd1fb7beb534833a6677733a8fec44e05ec9
-# Parent  1c511c19be41dbb119881638292d56b3ea43f4f3
-Bug 1426129 - Take a reference to `this` when calling methods asynchronously in CameraChild.cpp r=pehrsons
-
-diff --git a/dom/media/systemservices/CamerasChild.cpp b/dom/media/systemservices/CamerasChild.cpp
---- a/dom/media/systemservices/CamerasChild.cpp
-+++ b/dom/media/systemservices/CamerasChild.cpp
-@@ -29,17 +29,19 @@ mozilla::LazyLogModule gCamerasChildLog(
- 
- namespace mozilla {
- namespace camera {
- 
- CamerasSingleton::CamerasSingleton()
-   : mCamerasMutex("CamerasSingleton::mCamerasMutex"),
-     mCameras(nullptr),
-     mCamerasChildThread(nullptr),
--    mFakeDeviceChangeEventThread(nullptr) {
-+    mFakeDeviceChangeEventThread(nullptr),
-+    mInShutdown(false)
-+{
-   LOG(("CamerasSingleton: %p", this));
- }
- 
- CamerasSingleton::~CamerasSingleton() {
-   LOG(("~CamerasSingleton: %p", this));
- }
- 
- class FakeOnDeviceChangeEventRunnable : public Runnable
-@@ -286,33 +288,33 @@ CamerasChild::DispatchToParent(nsIRunnab
- int
- CamerasChild::NumberOfCapabilities(CaptureEngine aCapEngine,
-                                    const char* deviceUniqueIdUTF8)
- {
-   LOG((__PRETTY_FUNCTION__));
-   LOG(("NumberOfCapabilities for %s", deviceUniqueIdUTF8));
-   nsCString unique_id(deviceUniqueIdUTF8);
-   nsCOMPtr<nsIRunnable> runnable =
--    mozilla::NewNonOwningRunnableMethod<CaptureEngine, nsCString>(
-+    mozilla::NewRunnableMethod<CaptureEngine, nsCString>(
-       "camera::PCamerasChild::SendNumberOfCapabilities",
-       this,
-       &CamerasChild::SendNumberOfCapabilities,
-       aCapEngine,
-       unique_id);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, 0, mReplyInteger);
-   LOG(("Capture capability count: %d", dispatcher.ReturnValue()));
-   return dispatcher.ReturnValue();
- }
- 
- int
- CamerasChild::NumberOfCaptureDevices(CaptureEngine aCapEngine)
- {
-   LOG((__PRETTY_FUNCTION__));
-   nsCOMPtr<nsIRunnable> runnable =
--    mozilla::NewNonOwningRunnableMethod<CaptureEngine>(
-+    mozilla::NewRunnableMethod<CaptureEngine>(
-       "camera::PCamerasChild::SendNumberOfCaptureDevices",
-       this,
-       &CamerasChild::SendNumberOfCaptureDevices,
-       aCapEngine);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, 0, mReplyInteger);
-   LOG(("Capture Devices: %d", dispatcher.ReturnValue()));
-   return dispatcher.ReturnValue();
- }
-@@ -329,17 +331,17 @@ CamerasChild::RecvReplyNumberOfCaptureDe
-   return IPC_OK();
- }
- 
- int
- CamerasChild::EnsureInitialized(CaptureEngine aCapEngine)
- {
-   LOG((__PRETTY_FUNCTION__));
-   nsCOMPtr<nsIRunnable> runnable =
--    mozilla::NewNonOwningRunnableMethod<CaptureEngine>(
-+    mozilla::NewRunnableMethod<CaptureEngine>(
-       "camera::PCamerasChild::SendEnsureInitialized",
-       this,
-       &CamerasChild::SendEnsureInitialized,
-       aCapEngine);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, 0, mReplyInteger);
-   LOG(("Capture Devices: %d", dispatcher.ReturnValue()));
-   return dispatcher.ReturnValue();
- }
-@@ -348,17 +350,17 @@ int
- CamerasChild::GetCaptureCapability(CaptureEngine aCapEngine,
-                                    const char* unique_idUTF8,
-                                    const unsigned int capability_number,
-                                    webrtc::VideoCaptureCapability& capability)
- {
-   LOG(("GetCaptureCapability: %s %d", unique_idUTF8, capability_number));
-   nsCString unique_id(unique_idUTF8);
-   nsCOMPtr<nsIRunnable> runnable =
--    mozilla::NewNonOwningRunnableMethod<CaptureEngine, nsCString, unsigned int>(
-+    mozilla::NewRunnableMethod<CaptureEngine, nsCString, unsigned int>(
-       "camera::PCamerasChild::SendGetCaptureCapability",
-       this,
-       &CamerasChild::SendGetCaptureCapability,
-       aCapEngine,
-       unique_id,
-       capability_number);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, -1, mZero);
-   if (dispatcher.Success()) {
-@@ -390,17 +392,17 @@ CamerasChild::GetCaptureDevice(CaptureEn
-                                unsigned int list_number, char* device_nameUTF8,
-                                const unsigned int device_nameUTF8Length,
-                                char* unique_idUTF8,
-                                const unsigned int unique_idUTF8Length,
-                                bool* scary)
- {
-   LOG((__PRETTY_FUNCTION__));
-   nsCOMPtr<nsIRunnable> runnable =
--    mozilla::NewNonOwningRunnableMethod<CaptureEngine, unsigned int>(
-+    mozilla::NewRunnableMethod<CaptureEngine, unsigned int>(
-       "camera::PCamerasChild::SendGetCaptureDevice",
-       this,
-       &CamerasChild::SendGetCaptureDevice,
-       aCapEngine,
-       list_number);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, -1, mZero);
-   if (dispatcher.Success()) {
-     base::strlcpy(device_nameUTF8, mReplyDeviceName.get(), device_nameUTF8Length);
-@@ -434,19 +436,19 @@ CamerasChild::AllocateCaptureDevice(Capt
-                                     const char* unique_idUTF8,
-                                     const unsigned int unique_idUTF8Length,
-                                     int& aStreamId,
-                                     const mozilla::ipc::PrincipalInfo& aPrincipalInfo)
- {
-   LOG((__PRETTY_FUNCTION__));
-   nsCString unique_id(unique_idUTF8);
-   nsCOMPtr<nsIRunnable> runnable =
--    mozilla::NewNonOwningRunnableMethod<CaptureEngine,
--                                        nsCString,
--                                        const mozilla::ipc::PrincipalInfo&>(
-+    mozilla::NewRunnableMethod<CaptureEngine,
-+                               nsCString,
-+                               const mozilla::ipc::PrincipalInfo&>(
-       "camera::PCamerasChild::SendAllocateCaptureDevice",
-       this,
-       &CamerasChild::SendAllocateCaptureDevice,
-       aCapEngine,
-       unique_id,
-       aPrincipalInfo);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, -1, mZero);
-   if (dispatcher.Success()) {
-@@ -470,17 +472,17 @@ CamerasChild::RecvReplyAllocateCaptureDe
- }
- 
- int
- CamerasChild::ReleaseCaptureDevice(CaptureEngine aCapEngine,
-                                    const int capture_id)
- {
-   LOG((__PRETTY_FUNCTION__));
-   nsCOMPtr<nsIRunnable> runnable =
--    mozilla::NewNonOwningRunnableMethod<CaptureEngine, int>(
-+    mozilla::NewRunnableMethod<CaptureEngine, int>(
-       "camera::PCamerasChild::SendReleaseCaptureDevice",
-       this,
-       &CamerasChild::SendReleaseCaptureDevice,
-       aCapEngine,
-       capture_id);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, -1, mZero);
-   return dispatcher.ReturnValue();
- }
-@@ -521,49 +523,52 @@ CamerasChild::StartCapture(CaptureEngine
-   VideoCaptureCapability capCap(webrtcCaps.width,
-                            webrtcCaps.height,
-                            webrtcCaps.maxFPS,
-                            webrtcCaps.expectedCaptureDelay,
-                            webrtcCaps.rawType,
-                            webrtcCaps.codecType,
-                            webrtcCaps.interlaced);
-   nsCOMPtr<nsIRunnable> runnable = mozilla::
--    NewNonOwningRunnableMethod<CaptureEngine, int, VideoCaptureCapability>(
-+    NewRunnableMethod<CaptureEngine, int, VideoCaptureCapability>(
-       "camera::PCamerasChild::SendStartCapture",
-       this,
-       &CamerasChild::SendStartCapture,
-       aCapEngine,
-       capture_id,
-       capCap);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, -1, mZero);
-   return dispatcher.ReturnValue();
- }
- 
- int
- CamerasChild::StopCapture(CaptureEngine aCapEngine, const int capture_id)
- {
-   LOG((__PRETTY_FUNCTION__));
-   nsCOMPtr<nsIRunnable> runnable =
--    mozilla::NewNonOwningRunnableMethod<CaptureEngine, int>(
-+    mozilla::NewRunnableMethod<CaptureEngine, int>(
-       "camera::PCamerasChild::SendStopCapture",
-       this,
-       &CamerasChild::SendStopCapture,
-       aCapEngine,
-       capture_id);
-   LockAndDispatch<> dispatcher(this, __func__, runnable, -1, mZero);
-   if (dispatcher.Success()) {
-     RemoveCallback(aCapEngine, capture_id);
-   }
-   return dispatcher.ReturnValue();
- }
- 
- void
- Shutdown(void)
- {
-   OffTheBooksMutexAutoLock lock(CamerasSingleton::Mutex());
-+
-+  CamerasSingleton::StartShutdown();
-+
-   CamerasChild* child = CamerasSingleton::Child();
-   if (!child) {
-     // We don't want to cause everything to get fired up if we're
-     // really already shut down.
-     LOG(("Shutdown when already shut down"));
-     return;
-   }
-   child->ShutdownAll();
-@@ -605,17 +610,17 @@ CamerasChild::ShutdownParent()
-     mIPCIsAlive = false;
-     monitor.NotifyAll();
-   }
-   if (CamerasSingleton::Thread()) {
-     LOG(("Dispatching actor deletion"));
-     // Delete the parent actor.
-     // CamerasChild (this) will remain alive and is only deleted by the
-     // IPC layer when SendAllDone returns.
--    nsCOMPtr<nsIRunnable> deleteRunnable = mozilla::NewNonOwningRunnableMethod(
-+    nsCOMPtr<nsIRunnable> deleteRunnable = mozilla::NewRunnableMethod(
-       "camera::PCamerasChild::SendAllDone", this, &CamerasChild::SendAllDone);
-     CamerasSingleton::Thread()->Dispatch(deleteRunnable, NS_DISPATCH_NORMAL);
-   } else {
-     LOG(("ShutdownParent called without PBackground thread"));
-   }
- }
- 
- void
-@@ -728,17 +733,17 @@ CamerasChild::CamerasChild()
- 
-   MOZ_COUNT_CTOR(CamerasChild);
- }
- 
- CamerasChild::~CamerasChild()
- {
-   LOG(("~CamerasChild: %p", this));
- 
--  {
-+  if (!CamerasSingleton::InShutdown()) {
-     OffTheBooksMutexAutoLock lock(CamerasSingleton::Mutex());
-     // In normal circumstances we've already shut down and the
-     // following does nothing. But on fatal IPC errors we will
-     // get destructed immediately, and should not try to reach
-     // the parent.
-     ShutdownChild();
-   }
- 
-diff --git a/dom/media/systemservices/CamerasChild.h b/dom/media/systemservices/CamerasChild.h
---- a/dom/media/systemservices/CamerasChild.h
-+++ b/dom/media/systemservices/CamerasChild.h
-@@ -88,16 +88,24 @@ public:
-     return gTheInstance.get()->mCamerasChildThread;
-   }
- 
-   static nsCOMPtr<nsIThread>& FakeDeviceChangeEventThread() {
-     Mutex().AssertCurrentThreadOwns();
-     return gTheInstance.get()->mFakeDeviceChangeEventThread;
-   }
- 
-+  static bool InShutdown() {
-+    return gTheInstance.get()->mInShutdown;
-+  }
-+
-+  static void StartShutdown() {
-+    gTheInstance.get()->mInShutdown = true;
-+  }
-+
- private:
-   static Singleton<CamerasSingleton> gTheInstance;
- 
-   // Reinitializing CamerasChild will change the pointers below.
-   // We don't want this to happen in the middle of preparing IPC.
-   // We will be alive on destruction, so this needs to be off the books.
-   mozilla::OffTheBooksMutex mCamerasMutex;
- 
-@@ -105,16 +113,17 @@ private:
-   // It will set and clear this pointer as appropriate in setup/teardown.
-   // We'd normally make this a WeakPtr but unfortunately the IPC code already
-   // uses the WeakPtr mixin in a protected base class of CamerasChild, and in
-   // any case the object becomes unusable as soon as IPC is tearing down, which
-   // will be before actual destruction.
-   CamerasChild* mCameras;
-   nsCOMPtr<nsIThread> mCamerasChildThread;
-   nsCOMPtr<nsIThread> mFakeDeviceChangeEventThread;
-+  Atomic<bool> mInShutdown;
- };
- 
- // Get a pointer to a CamerasChild object we can use to do IPC with.
- // This does everything needed to set up, including starting the IPC
- // channel with PBackground, blocking until thats done, and starting the
- // thread to do IPC on. This will fail if we're in shutdown. On success
- // it will set up the CamerasSingleton.
- CamerasChild* GetCamerasChild();
-@@ -144,17 +153,17 @@ class CamerasChild final : public PCamer
-                           ,public DeviceChangeCallback
- {
-   friend class mozilla::ipc::BackgroundChildImpl;
-   template <class T> friend class mozilla::camera::LockAndDispatch;
- 
- public:
-   // We are owned by the PBackground thread only. CamerasSingleton
-   // takes a non-owning reference.
--  NS_INLINE_DECL_REFCOUNTING(CamerasChild)
-+  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CamerasChild)
- 
-   // IPC messages recevied, received on the PBackground thread
-   // these are the actual callbacks with data
-   virtual mozilla::ipc::IPCResult RecvDeliverFrame(const CaptureEngine&, const int&,
-                                                    mozilla::ipc::Shmem&&,
-                                                    const VideoFrameProperties & prop) override;
-   virtual mozilla::ipc::IPCResult RecvFrameSizeChange(const CaptureEngine&, const int&,
-                                                       const int& w, const int& h) override;

+ 0 - 35
comm-esr60/mozilla-esr60/patches/1433058-61a1.patch

@@ -1,35 +0,0 @@
-# HG changeset patch
-# User Bas Schouten <bschouten@mozilla.com>
-# Date 1523022482 -7200
-# Node ID d4b2d3cd0ad1c667377feef9370e048129c30e95
-# Parent  07ffbe99af0730d84e4583ff139f9e299e032b3f
-Bug 1433058: Expand NVidia AL blacklist to include 385.96 and limit blacklist to the last affected version. r=milan
-
-MozReview-Commit-ID: 1quCjKRILiE
-
-diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp
---- a/widget/windows/GfxInfo.cpp
-+++ b/widget/windows/GfxInfo.cpp
-@@ -1368,20 +1368,20 @@ GfxInfo::GetGfxDriverInfo()
-     // bug 1359416
-     APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows,
-       (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel),
-       (GfxDeviceFamily*) GfxDriverInfo::GetDeviceFamily(IntelHDGraphicsToSandyBridge),
-       nsIGfxInfo::FEATURE_D3D11_KEYED_MUTEX, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
-       DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions, "FEATURE_FAILURE_BUG_1359416");
- 
-     // bug 1419264
--    APPEND_TO_DRIVER_BLOCKLIST(OperatingSystem::Windows7,
-+    APPEND_TO_DRIVER_BLOCKLIST_RANGE(OperatingSystem::Windows7,
-       (nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
-       nsIGfxInfo::FEATURE_ADVANCED_LAYERS, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
--      DRIVER_GREATER_THAN_OR_EQUAL, V(23,21,13,8813),
-+      DRIVER_BETWEEN_INCLUSIVE, V(23,21,13,8569), V(23,21,13,9135),
-       "FEATURE_FAILURE_BUG_1419264", "Windows 10");
-   }
-   return *mDriverInfo;
- }
- 
- nsresult
- GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
-                               int32_t *aStatus,

+ 0 - 69
comm-esr60/mozilla-esr60/patches/1436241.patch

@@ -1,69 +0,0 @@
-# HG changeset patch
-# User Kyle Machulis <kyle@nonpolynomial.com>
-# Date 1525117755 25200
-#      Mon Apr 30 12:49:15 2018 -0700
-# Node ID 67b2d8924841a4c44e2907628d35ee8a022ecd2d
-# Parent  32964e8fbccdc7863c0fce2a630239904e4a8271
-Bug 1436241 - Check redirect status code before forwarding to NPAPI. r=jimm, r=pauljt, a=jcristau
-
-NPAPI may handle a 307 redirect across different origins, while they
-should only happen on same origin requests. Have the browser check
-this before forwarding to NPAPI.
-
-MozReview-Commit-ID: 5vxMooygI4g
-
-diff --git a/dom/plugins/base/nsPluginStreamListenerPeer.cpp b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
---- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp
-+++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp
-@@ -1376,25 +1376,16 @@ NS_IMETHODIMP
- nsPluginStreamListenerPeer::AsyncOnChannelRedirect(nsIChannel *oldChannel, nsIChannel *newChannel,
-                                                    uint32_t flags, nsIAsyncVerifyRedirectCallback* callback)
- {
-   // Disallow redirects if we don't have a stream listener.
-   if (!mPStreamListener) {
-     return NS_ERROR_FAILURE;
-   }
- 
--  nsCOMPtr<nsIAsyncVerifyRedirectCallback> proxyCallback =
--    new ChannelRedirectProxyCallback(this, callback, oldChannel, newChannel);
--
--  // Give NPAPI a chance to control redirects.
--  bool notificationHandled = mPStreamListener->HandleRedirectNotification(oldChannel, newChannel, proxyCallback);
--  if (notificationHandled) {
--    return NS_OK;
--  }
--
-   // Don't allow cross-origin 307 POST redirects.
-   nsCOMPtr<nsIHttpChannel> oldHttpChannel(do_QueryInterface(oldChannel));
-   if (oldHttpChannel) {
-     uint32_t responseStatus;
-     nsresult rv = oldHttpChannel->GetResponseStatus(&responseStatus);
-     if (NS_FAILED(rv)) {
-       return rv;
-     }
-@@ -1408,16 +1399,25 @@ nsPluginStreamListenerPeer::AsyncOnChann
-         rv = nsContentUtils::CheckSameOrigin(oldChannel, newChannel);
-         if (NS_FAILED(rv)) {
-           return rv;
-         }
-       }
-     }
-   }
- 
-+  nsCOMPtr<nsIAsyncVerifyRedirectCallback> proxyCallback =
-+    new ChannelRedirectProxyCallback(this, callback, oldChannel, newChannel);
-+
-+  // Give NPAPI a chance to control redirects.
-+  bool notificationHandled = mPStreamListener->HandleRedirectNotification(oldChannel, newChannel, proxyCallback);
-+  if (notificationHandled) {
-+    return NS_OK;
-+  }
-+
-   // Fall back to channel event sink for window.
-   nsCOMPtr<nsIChannelEventSink> channelEventSink;
-   nsresult rv = GetInterfaceGlobal(NS_GET_IID(nsIChannelEventSink), getter_AddRefs(channelEventSink));
-   if (NS_FAILED(rv)) {
-     return rv;
-   }
- 
-   return channelEventSink->AsyncOnChannelRedirect(oldChannel, newChannel, flags, proxyCallback);

+ 0 - 46
comm-esr60/mozilla-esr60/patches/1438917.patch

@@ -1,46 +0,0 @@
-# HG changeset patch
-# User Lee Salzman <lsalzman@mozilla.com>
-# Date 1521474974 14400
-#      Mon Mar 19 11:56:14 2018 -0400
-# Node ID 25c727364e92b35f1a6e7b4f1e23527fb5305474
-# Parent  6ecf7107078bff6546893bd58fd0ed1bb0f2ded5
-Bug 1438917 - Limit allocations in SkTDynamicHash. r=jrmuizel, a=RyanVM
-
-MozReview-Commit-ID: 1d3Tngi6Uek
-
-diff --git a/gfx/skia/skia/src/core/SkTDynamicHash.h b/gfx/skia/skia/src/core/SkTDynamicHash.h
---- a/gfx/skia/skia/src/core/SkTDynamicHash.h
-+++ b/gfx/skia/skia/src/core/SkTDynamicHash.h
-@@ -236,29 +236,30 @@ private:
-                 return;
-             }
-             index = this->nextIndex(index, round);
-         }
-         SkASSERT(fCapacity == 0);
-     }
- 
-     void maybeGrow() {
--        if (100 * (fCount + fDeleted + 1) > fCapacity * kGrowPercent) {
-+        if (100 * (int64_t(fCount + fDeleted) + 1) > int64_t(fCapacity) * kGrowPercent) {
-+            SkASSERT_RELEASE(fCapacity <= std::numeric_limits<int>::max() / 2);
-             this->resize(fCapacity > 0 ? fCapacity * 2 : 4);
-         }
-     }
- 
-     void resize(int newCapacity) {
-         SkDEBUGCODE(int oldCount = fCount;)
-         int oldCapacity = fCapacity;
-         SkAutoTMalloc<T*> oldArray(fArray);
- 
-         fCount = fDeleted = 0;
-         fCapacity = newCapacity;
--        fArray = (T**)sk_calloc_throw(sizeof(T*) * fCapacity);
-+        fArray = (T**)sk_calloc_throw(fCapacity, sizeof(T*));
- 
-         for (int i = 0; i < oldCapacity; i++) {
-             T* entry = oldArray[i];
-             if (Empty() != entry && Deleted() != entry) {
-                 this->innerAdd(entry);
-             }
-         }
-         SkASSERT(oldCount == fCount);

+ 0 - 71
comm-esr60/mozilla-esr60/patches/1439450.patch

@@ -1,71 +0,0 @@
-# HG changeset patch
-# User Dimi Lee <dlee@mozilla.com>
-# Date 1539686161 0
-# Node ID 37d138b1e58b9c45ee3baef530bb133597b14eb3
-# Parent  ce4409635ca1be25918a451f420d7504d7132998
-Bug 1439450 - Ignore has_first_value() check in ProtocolParser. r=francois
-
-Sometimes the protocol buffer data (RiceEncodingData) sent by Google's Safe Browsing server has the following properties:
-
-1. |has_first_value| is false
-2. |num_entries| > 0
-
-In this case, we can still parse the data and apply partial update correctly by assuming that the first value is equal to 0.
-
-Differential Revision: https://phabricator.services.mozilla.com/D6393
-
-diff --git a/toolkit/components/url-classifier/ProtocolParser.cpp b/toolkit/components/url-classifier/ProtocolParser.cpp
---- a/toolkit/components/url-classifier/ProtocolParser.cpp
-+++ b/toolkit/components/url-classifier/ProtocolParser.cpp
-@@ -978,44 +978,45 @@ ProtocolParserProtobuf::ProcessRawRemova
- 
-   return NS_OK;
- }
- 
- static nsresult
- DoRiceDeltaDecode(const RiceDeltaEncoding& aEncoding,
-                   nsTArray<uint32_t>& aDecoded)
- {
--  if (!aEncoding.has_first_value()) {
--    PARSER_LOG(("The encoding info is incomplete."));
--    return NS_ERROR_FAILURE;
--  }
-   if (aEncoding.num_entries() > 0 &&
-       (!aEncoding.has_rice_parameter() || !aEncoding.has_encoded_data())) {
-     PARSER_LOG(("Rice parameter or encoded data is missing."));
-     return NS_ERROR_FAILURE;
-+  } else if (aEncoding.num_entries() == 0 && !aEncoding.has_first_value()) {
-+    PARSER_LOG(("Missing first_value for an single-integer Rice encoding."));
-+    return NS_ERROR_FAILURE;
-   }
- 
-+  auto first_value = aEncoding.has_first_value() ? aEncoding.first_value() : 0;
-+
-   PARSER_LOG(("* Encoding info:"));
--  PARSER_LOG(("  - First value: %" PRId64, aEncoding.first_value()));
-+  PARSER_LOG(("  - First value: %" PRId64, first_value));
-   PARSER_LOG(("  - Num of entries: %d", aEncoding.num_entries()));
-   PARSER_LOG(("  - Rice parameter: %d", aEncoding.rice_parameter()));
- 
-   // Set up the input buffer. Note that the bits should be read
-   // from LSB to MSB so that we in-place reverse the bits before
-   // feeding to the decoder.
-   auto encoded = const_cast<RiceDeltaEncoding&>(aEncoding).mutable_encoded_data();
-   RiceDeltaDecoder decoder((uint8_t*)encoded->c_str(), encoded->size());
- 
-   // Setup the output buffer. The "first value" is included in
-   // the output buffer.
-   aDecoded.SetLength(aEncoding.num_entries() + 1);
- 
-   // Decode!
-   bool rv = decoder.Decode(aEncoding.rice_parameter(),
--                           aEncoding.first_value(), // first value.
-+                           first_value,
-                            aEncoding.num_entries(), // # of entries (first value not included).
-                            &aDecoded[0]);
- 
-   NS_ENSURE_TRUE(rv, NS_ERROR_FAILURE);
- 
-   return NS_OK;
- }
- 

+ 0 - 52
comm-esr60/mozilla-esr60/patches/1458048.patch

@@ -1,52 +0,0 @@
-# HG changeset patch
-# User Nils Ohlmeier [:drno] <drno@ohlmeier.org>
-# Date 1529553289 25200
-#      Wed Jun 20 20:54:49 2018 -0700
-# Node ID 068e249d02b4aa3f34e536b4fcd4df3aa9c11e47
-# Parent  1a7200f3a1d97a663c2ecf790f1dc36fb1cd5759
-Bug 1458048 - Cherry pick usersctp rev 8789a6da02e2c7c03522bc6f275b302f6ef977fe; r=drno, a=jcristau
-
-diff --git a/netwerk/sctp/src/netinet/sctp_auth.c b/netwerk/sctp/src/netinet/sctp_auth.c
---- a/netwerk/sctp/src/netinet/sctp_auth.c
-+++ b/netwerk/sctp/src/netinet/sctp_auth.c
-@@ -1520,16 +1520,18 @@ sctp_auth_get_cookie_params(struct sctp_
- 		keylen += sizeof(*chunks) + num_chunks;
- 	}
- 	new_key = sctp_alloc_key(keylen);
- 	if (new_key != NULL) {
- 	    /* copy in the RANDOM */
- 	    if (p_random != NULL) {
- 		keylen = sizeof(*p_random) + random_len;
- 		bcopy(p_random, new_key->key, keylen);
-+	    } else {
-+		keylen = 0;
- 	    }
- 	    /* append in the AUTH chunks */
- 	    if (chunks != NULL) {
- 		bcopy(chunks, new_key->key + keylen,
- 		      sizeof(*chunks) + num_chunks);
- 		keylen += sizeof(*chunks) + num_chunks;
- 	    }
- 	    /* append in the HMACs */
-diff --git a/netwerk/sctp/src/netinet/sctp_pcb.c b/netwerk/sctp/src/netinet/sctp_pcb.c
---- a/netwerk/sctp/src/netinet/sctp_pcb.c
-+++ b/netwerk/sctp/src/netinet/sctp_pcb.c
-@@ -7683,16 +7683,18 @@ sctp_load_addresses_from_init(struct sct
- 		keylen += sizeof(*chunks) + num_chunks;
- 	}
- 	new_key = sctp_alloc_key(keylen);
- 	if (new_key != NULL) {
- 		/* copy in the RANDOM */
- 		if (p_random != NULL) {
- 			keylen = sizeof(*p_random) + random_len;
- 			bcopy(p_random, new_key->key, keylen);
-+		} else {
-+			keylen = 0;
- 		}
- 		/* append in the AUTH chunks */
- 		if (chunks != NULL) {
- 			bcopy(chunks, new_key->key + keylen,
- 			      sizeof(*chunks) + num_chunks);
- 			keylen += sizeof(*chunks) + num_chunks;
- 		}
- 		/* append in the HMACs */

+ 0 - 65
comm-esr60/mozilla-esr60/patches/1462912.patch

@@ -1,65 +0,0 @@
-# HG changeset patch
-# User Alex Gaynor <agaynor@mozilla.com>
-# Date 1527008699 14400
-#      Tue May 22 13:04:59 2018 -0400
-# Node ID f18535a212da01cb384259f9b286006d0ae8eb37
-# Parent  26fa820021ca66414390b2989efafd77f9cd43ed
-Bug 1462912 - Fixed BufferList::Extract to handle the case where the call consumes the entirety of the BufferList. r=froydnj, a=RyanVM
-
-MozReview-Commit-ID: 1LWODn8JaNL
-
-diff --git a/mfbt/BufferList.h b/mfbt/BufferList.h
---- a/mfbt/BufferList.h
-+++ b/mfbt/BufferList.h
-@@ -578,17 +578,24 @@ BufferList<AllocPolicy>::Extract(IterImp
-     size_t segmentsToCopy = segmentsNeeded - lastSegmentSize.isSome();
-     for (size_t i = 0; i < segmentsToCopy; ++i) {
-       result.mSegments.infallibleAppend(
-         Segment(mSegments[aIter.mSegment].mData,
-                 mSegments[aIter.mSegment].mSize,
-                 mSegments[aIter.mSegment].mCapacity));
-       aIter.Advance(*this, aIter.RemainingInSegment());
-     }
--    MOZ_RELEASE_ASSERT(aIter.mSegment == copyStart + segmentsToCopy);
-+    // Due to the way IterImpl works, there are two cases here: (1) if we've
-+    // consumed the entirety of the BufferList, then the iterator is pointed at
-+    // the end of the final segment, (2) otherwise it is pointed at the start
-+    // of the next segment. We want to verify that we really consumed all
-+    // |segmentsToCopy| segments.
-+    MOZ_RELEASE_ASSERT(
-+      (aIter.mSegment == copyStart + segmentsToCopy) ||
-+      (aIter.Done() && aIter.mSegment == copyStart + segmentsToCopy - 1));
-     mSegments.erase(mSegments.begin() + copyStart,
-                     mSegments.begin() + copyStart + segmentsToCopy);
- 
-     // Reset the iter's position for what we just deleted.
-     aIter.mSegment -= segmentsToCopy;
- 
-     if (lastSegmentSize.isSome()) {
-       // We called reserve() on result.mSegments so infallibleAppend is safe.
-diff --git a/mfbt/tests/TestBufferList.cpp b/mfbt/tests/TestBufferList.cpp
---- a/mfbt/tests/TestBufferList.cpp
-+++ b/mfbt/tests/TestBufferList.cpp
-@@ -274,10 +274,22 @@ int main(void)
-   BufferList bl8(0, 0, 16);
-   bl8.WriteBytes("abcdefgh12345678", 16);
-   iter = bl8.Iter();
-   BufferList bl9 = bl8.Extract(iter, 8, &success);
-   MOZ_RELEASE_ASSERT(success);
-   MOZ_RELEASE_ASSERT(bl9.Size() == 8);
-   MOZ_RELEASE_ASSERT(!iter.Done());
- 
-+  BufferList bl10(0, 0, 8);
-+  bl10.WriteBytes("abcdefgh", 8);
-+  bl10.WriteBytes("12345678", 8);
-+  iter = bl10.Iter();
-+  BufferList bl11 = bl10.Extract(iter, 16, &success);
-+  MOZ_RELEASE_ASSERT(success);
-+  MOZ_RELEASE_ASSERT(bl11.Size() == 16);
-+  MOZ_RELEASE_ASSERT(iter.Done());
-+  iter = bl11.Iter();
-+  MOZ_RELEASE_ASSERT(bl11.ReadBytes(iter, data, 16));
-+  MOZ_RELEASE_ASSERT(memcmp(data, "abcdefgh12345678", 16) == 0);
-+
-   return 0;
- }

+ 0 - 62
comm-esr60/mozilla-esr60/patches/1464079.patch

@@ -1,62 +0,0 @@
-# HG changeset patch
-# User Byron Campen [:bwc] <docfaraday@gmail.com>
-# Date 1527784219 18000
-#      Thu May 31 11:30:19 2018 -0500
-# Node ID 05549a4d1b80242ad384c46836d86b7da376f0f5
-# Parent  de8cd2499bba19e34e122fbc5bb3608429d4abd7
-Bug 1464079 - Bring ICE connection state change callback up to spec. r=jib, a=RyanVM
-
-diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js
---- a/dom/media/PeerConnection.js
-+++ b/dom/media/PeerConnection.js
-@@ -584,16 +584,28 @@ class RTCPeerConnection {
- 
-     try {
-       wrapCallback(onSucc)(await func());
-     } catch (e) {
-       wrapCallback(onErr)(e);
-     }
-   }
- 
-+  // This implements the fairly common "Queue a task" logic
-+  async _queueTaskWithClosedCheck(func) {
-+    return new this._win.Promise(resolve => {
-+      Services.tm.dispatchToMainThread({ run() {
-+        if (!this._closed) {
-+          func();
-+          resolve();
-+        }
-+      }});
-+    });
-+  }
-+
-   /**
-    * An RTCConfiguration may look like this:
-    *
-    * { "iceServers": [ { urls: "stun:stun.example.org", },
-    *                   { url: "stun:stun.example.org", }, // deprecated version
-    *                   { urls: ["turn:turn1.x.org", "turn:turn2.x.org"],
-    *                     username:"jib", credential:"mypass"} ] }
-    *
-@@ -1508,17 +1520,20 @@ class PeerConnectionObserver {
- 
-   onStateChange(state) {
-     switch (state) {
-       case "SignalingState":
-         this.dispatchEvent(new this._win.Event("signalingstatechange"));
-         break;
- 
-       case "IceConnectionState":
--        this.handleIceConnectionStateChange(this._dompc._pc.iceConnectionState);
-+        let connState = this._dompc._pc.iceConnectionState;
-+        this._dompc._queueTaskWithClosedCheck(() => {
-+          this.handleIceConnectionStateChange(connState);
-+        });
-         break;
- 
-       case "IceGatheringState":
-         this.handleIceGatheringStateChange(this._dompc._pc.iceGatheringState);
-         break;
- 
-       case "SdpState":
-         // No-op

+ 0 - 71
comm-esr60/mozilla-esr60/patches/1495011.patch

@@ -1,71 +0,0 @@
-# HG changeset patch
-# User Henri Sivonen <hsivonen@hsivonen.fi>
-# Date 1538394448 -10800
-# Node ID a5f6d07b35d1906a135741a12bd31fb701132c6c
-# Parent  29223473ed105cf71db47b0822cc4b384b447c32
-Bug 1495011. r=baku.
-
-MozReview-Commit-ID: 8d7DzFnZx4n
-
-Differential Revision: https://phabricator.services.mozilla.com/D7273
-
-diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
---- a/dom/script/ScriptLoader.cpp
-+++ b/dom/script/ScriptLoader.cpp
-@@ -2503,38 +2503,48 @@ ScriptLoader::ConvertToUTF16(nsIChannel*
- 
-   if (!unicodeDecoder) {
-     // Curiously, there are various callers that don't pass aDocument. The
-     // fallback in the old code was ISO-8859-1, which behaved like
-     // windows-1252.
-     unicodeDecoder = WINDOWS_1252_ENCODING->NewDecoderWithoutBOMHandling();
-   }
- 
--  CheckedInt<size_t> unicodeLength =
--    unicodeDecoder->MaxUTF16BufferLength(aLength);
--  if (!unicodeLength.isValid()) {
-+  CheckedInt<size_t> maxLength = unicodeDecoder->MaxUTF16BufferLength(aLength);
-+  if (!maxLength.isValid()) {
-+    aBufOut = nullptr;
-+    aLengthOut = 0;
-     return NS_ERROR_OUT_OF_MEMORY;
-   }
- 
--  aBufOut =
--    static_cast<char16_t*>(js_malloc(unicodeLength.value() * sizeof(char16_t)));
-+  size_t unicodeLength = maxLength.value();
-+
-+  maxLength *= sizeof(char16_t);
-+
-+  if (!maxLength.isValid()) {
-+    aBufOut = nullptr;
-+    aLengthOut = 0;
-+    return NS_ERROR_OUT_OF_MEMORY;
-+  }
-+
-+  aBufOut = static_cast<char16_t*>(js_malloc(maxLength.value()));
-   if (!aBufOut) {
-     aLengthOut = 0;
-     return NS_ERROR_OUT_OF_MEMORY;
-   }
- 
-   uint32_t result;
-   size_t read;
-   size_t written;
-   bool hadErrors;
--  Tie(result, read, written, hadErrors) = unicodeDecoder->DecodeToUTF16(
--    data, MakeSpan(aBufOut, unicodeLength.value()), true);
-+  Tie(result, read, written, hadErrors) =
-+    unicodeDecoder->DecodeToUTF16(data, MakeSpan(aBufOut, unicodeLength), true);
-   MOZ_ASSERT(result == kInputEmpty);
-   MOZ_ASSERT(read == aLength);
--  MOZ_ASSERT(written <= unicodeLength.value());
-+  MOZ_ASSERT(written <= unicodeLength);
-   Unused << hadErrors;
-   aLengthOut = written;
- 
-   nsAutoCString charset;
-   unicodeDecoder->Encoding()->Name(charset);
-   mozilla::Telemetry::Accumulate(mozilla::Telemetry::DOM_SCRIPT_SRC_ENCODING,
-     charset);
-   return NS_OK;

+ 0 - 32
comm-esr60/mozilla-esr60/patches/1496588.patch

@@ -1,32 +0,0 @@
-# HG changeset patch
-# User David Major <dmajor@mozilla.com>
-# Date 1538771020 14400
-# Node ID 859cf0f7d17c9571445b4ee2a17d49083c983615
-# Parent  8672d53ead9a1f2a1038475875b53b3b74dfff18
-Bug 1496588: Avoid a UB in mozStorageService.cpp. r=froydnj
-
-diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
---- a/storage/mozStorageService.cpp
-+++ b/storage/mozStorageService.cpp
-@@ -784,18 +784,20 @@ Service::OpenAsyncDatabase(nsIVariant *a
-   rv = aDatabaseStore->GetAsISupports(getter_AddRefs(dbStore));
-   if (NS_SUCCEEDED(rv)) {
-     // Generally, aDatabaseStore holds the database nsIFile.
-     storageFile = do_QueryInterface(dbStore, &rv);
-     if (NS_FAILED(rv)) {
-       return NS_ERROR_INVALID_ARG;
-     }
- 
--    rv = storageFile->Clone(getter_AddRefs(storageFile));
-+    nsCOMPtr<nsIFile> cloned;
-+    rv = storageFile->Clone(getter_AddRefs(cloned));
-     MOZ_ASSERT(NS_SUCCEEDED(rv));
-+    storageFile = cloned.forget();
- 
-     if (!readOnly) {
-       // Ensure that SQLITE_OPEN_CREATE is passed in for compatibility reasons.
-       flags |= SQLITE_OPEN_CREATE;
-     }
- 
-     // Apply the shared-cache option.
-     flags |= shared ? SQLITE_OPEN_SHAREDCACHE : SQLITE_OPEN_PRIVATECACHE;

+ 0 - 28
comm-esr60/mozilla-esr60/patches/1498433.patch

@@ -1,28 +0,0 @@
-# HG changeset patch
-# User Stephen A Pohl <spohl.mozilla.bugs@gmail.com>
-# Date 1539398800 14400
-# Node ID 2aede0d5656f05304e2a584cabd0ce9c0337723f
-# Parent  c7bad7d752ced91bedf8895f6d82443a077ca60f
-Bug 1498433: Ensure that crash reporter is in the foreground and focused on macOS. r=mstange
-
-diff --git a/toolkit/crashreporter/client/crashreporter_osx.mm b/toolkit/crashreporter/client/crashreporter_osx.mm
---- a/toolkit/crashreporter/client/crashreporter_osx.mm
-+++ b/toolkit/crashreporter/client/crashreporter_osx.mm
-@@ -96,16 +96,17 @@ static bool RestartApplication()
- 
- -(void)awakeFromNib
- {
-   gUI = self;
-   [mWindow center];
- 
-   [mWindow setTitle:[[NSBundle mainBundle]
-                       objectForInfoDictionaryKey:@"CFBundleName"]];
-+  [NSApp activateIgnoringOtherApps:YES];
- }
- 
- -(void)showCrashUI:(const StringTable&)files
-    queryParameters:(const StringTable&)queryParameters
-            sendURL:(const string&)sendURL
- {
-   gFiles = files;
-   gQueryParameters = queryParameters;

+ 0 - 67
comm-esr60/mozilla-esr60/patches/1500759.patch

@@ -1,67 +0,0 @@
-# HG changeset patch
-# User Jon Coppeard <jcoppeard@mozilla.com>
-# Date 1541589169 0
-#      Wed Nov 07 11:12:49 2018 +0000
-# Node ID 5e1a9644aeef3c38b34a81abb3ab2a931266b487
-# Parent  b3b8bc20edd0bc474ec347beec9a93d09577f963
-Bug 1500759 - Root parameter dictionaries in AesTask::Init(). r=keeler, a=lizzard
-
-diff --git a/dom/crypto/WebCryptoTask.cpp b/dom/crypto/WebCryptoTask.cpp
---- a/dom/crypto/WebCryptoTask.cpp
-+++ b/dom/crypto/WebCryptoTask.cpp
-@@ -580,34 +580,34 @@ public:
- 
-     // Cache parameters depending on the specific algorithm
-     TelemetryAlgorithm telemetryAlg;
-     if (algName.EqualsLiteral(WEBCRYPTO_ALG_AES_CBC)) {
-       CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_AES_CBC);
- 
-       mMechanism = CKM_AES_CBC_PAD;
-       telemetryAlg = TA_AES_CBC;
--      AesCbcParams params;
-+      RootedDictionary<AesCbcParams> params(aCx);
-       nsresult rv = Coerce(aCx, params, aAlgorithm);
-       if (NS_FAILED(rv)) {
-         mEarlyRv = NS_ERROR_DOM_INVALID_ACCESS_ERR;
-         return;
-       }
- 
-       ATTEMPT_BUFFER_INIT(mIv, params.mIv)
-       if (mIv.Length() != 16) {
-         mEarlyRv = NS_ERROR_DOM_DATA_ERR;
-         return;
-       }
-     } else if (algName.EqualsLiteral(WEBCRYPTO_ALG_AES_CTR)) {
-       CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_AES_CTR);
- 
-       mMechanism = CKM_AES_CTR;
-       telemetryAlg = TA_AES_CTR;
--      AesCtrParams params;
-+      RootedDictionary<AesCtrParams> params(aCx);
-       nsresult rv = Coerce(aCx, params, aAlgorithm);
-       if (NS_FAILED(rv)) {
-         mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
-         return;
-       }
- 
-       ATTEMPT_BUFFER_INIT(mIv, params.mCounter)
-       if (mIv.Length() != 16) {
-@@ -616,17 +616,17 @@ public:
-       }
- 
-       mCounterLength = params.mLength;
-     } else if (algName.EqualsLiteral(WEBCRYPTO_ALG_AES_GCM)) {
-       CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_AES_GCM);
- 
-       mMechanism = CKM_AES_GCM;
-       telemetryAlg = TA_AES_GCM;
--      AesGcmParams params;
-+      RootedDictionary<AesGcmParams> params(aCx);
-       nsresult rv = Coerce(aCx, params, aAlgorithm);
-       if (NS_FAILED(rv)) {
-         mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
-         return;
-       }
- 
-       ATTEMPT_BUFFER_INIT(mIv, params.mIv)
- 

+ 0 - 87
comm-esr60/mozilla-esr60/patches/NOBUG-0c5f5c2e2a86.patch

@@ -1,87 +0,0 @@
-# HG changeset patch
-# User Jeff Gilbert <jgilbert@mozilla.com>
-# Date 1539382900 25200
-# Node ID 0c5f5c2e2a860f9f681e301662aabe2deca8be4b
-# Parent  388c51b9d3b60c23d3192ee9bfce93693f38108b
-No bug - Fix compiler warnings on Windows.
-
-diff --git a/dom/plugins/test/testplugin/nptest_windows.cpp b/dom/plugins/test/testplugin/nptest_windows.cpp
---- a/dom/plugins/test/testplugin/nptest_windows.cpp
-+++ b/dom/plugins/test/testplugin/nptest_windows.cpp
-@@ -66,18 +66,16 @@ bool
- pluginSupportsWindowlessMode()
- {
-   return true;
- }
- 
- NPError
- pluginInstanceInit(InstanceData* instanceData)
- {
--  NPP npp = instanceData->npp;
--
-   instanceData->platformData = static_cast<PlatformData*>
-     (NPN_MemAlloc(sizeof(PlatformData)));
-   if (!instanceData->platformData)
-     return NPERR_OUT_OF_MEMORY_ERROR;
- 
-   instanceData->platformData->childWindow = nullptr;
-   instanceData->platformData->device = nullptr;
-   instanceData->platformData->frontBuffer = nullptr;
-diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp
---- a/gfx/thebes/gfxGDIFontList.cpp
-+++ b/gfx/thebes/gfxGDIFontList.cpp
-@@ -683,19 +683,18 @@ gfxGDIFontList::InitFontListForPlatform(
-     mNonExistingFonts.Clear();
- 
-     // iterate over available families
-     LOGFONTW logfont;
-     memset(&logfont, 0, sizeof(logfont));
-     logfont.lfCharSet = DEFAULT_CHARSET;
- 
-     AutoDC hdc;
--    int result = EnumFontFamiliesExW(hdc.GetDC(), &logfont,
--                                     (FONTENUMPROCW)&EnumFontFamExProc,
--                                     0, 0);
-+    (void)EnumFontFamiliesExW(hdc.GetDC(), &logfont,
-+                              (FONTENUMPROCW)&EnumFontFamExProc, 0, 0);
- 
-     GetFontSubstitutes();
- 
-     GetPrefsAndStartLoader();
- 
-     return NS_OK;
- }
- 
-diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp
---- a/gfx/thebes/gfxWindowsPlatform.cpp
-+++ b/gfx/thebes/gfxWindowsPlatform.cpp
-@@ -1259,27 +1259,27 @@ gfxWindowsPlatform::IsOptimus()
-         {
-             knowIsOptimus = 1;
-         } else {
-             knowIsOptimus = 0;
-         }
-     }
-     return knowIsOptimus;
- }
--
-+/*
- static inline bool
- IsWARPStable()
- {
-   // It seems like nvdxgiwrap makes a mess of WARP. See bug 1154703.
-   if (!IsWin8OrLater() || GetModuleHandleA("nvdxgiwrap.dll")) {
-     return false;
-   }
-   return true;
- }
--
-+*/
- static void
- InitializeANGLEConfig()
- {
-   FeatureState& d3d11ANGLE = gfxConfig::GetFeature(Feature::D3D11_HW_ANGLE);
- 
-   if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
-     d3d11ANGLE.DisableByDefault(FeatureStatus::Unavailable, "D3D11 compositing is disabled",
-                                 NS_LITERAL_CSTRING("FEATURE_FAILURE_D3D11_DISABLED"));

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

@@ -217,22 +217,6 @@ NOBUG-BACKOUT-1439860-60.patch
 TOP-9999999-rust133-257.patch
 TOP-9999999-fixlangpack-257.patch
 mozilla-esr60-top-nonexisting.patch
-1426129.patch
-1496588.patch
-1495011.patch
-1438917.patch
-1439450.patch
-1498433.patch
-1436241.patch
-1458048.patch
-NOBUG-0c5f5c2e2a86.patch
-1462912.patch
-1464079.patch
-1336712.patch
-1500759.patch
-1437128-61a1.patch
-1433058-61a1.patch
-1445969-61a1.patch
 1446809-1-61a1.patch
 1446809-2-61a1.patch
 1446809-3-61a1.patch

+ 7 - 7
comm-esr60/mozilla-esr60/patches/1336712.patch → rel-257/mozilla-esr60/patches/1336712-65a1.patch

@@ -2,7 +2,7 @@
 # User Chris Peterson <cpeterson@mozilla.com>
 # Date 1541718719 0
 # Node ID e006dd6e8fbd62dd57538294ac29e3489cb823ae
-# Parent  1f1674fcd0185e87a77265ceac3fbc2cdd06c1bc
+# Parent  8da2ef9cfccf26b58ae73db01777ce8cabbf2541
 Bug 1336712 - toolkit: Drop test checks for OS X <= 10.8 and Windows XP. r=kmag
 
 Depends on D6584
@@ -12,7 +12,7 @@ Differential Revision: https://phabricator.services.mozilla.com/D6585
 diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
 --- a/toolkit/content/aboutSupport.js
 +++ b/toolkit/content/aboutSupport.js
-@@ -56,20 +56,16 @@ var snapshotFormatters = {
+@@ -57,20 +57,16 @@ var snapshotFormatters = {
        case 1:
        case 2:
        case 4:
@@ -45,10 +45,10 @@ diff --git a/toolkit/content/tests/chrome/test_bug624329.xul b/toolkit/content/t
  }
  
  function childResized() {
--    const isOSXLion = navigator.userAgent.indexOf("Mac OS X 10.7") != -1;
--    const isOSXMtnLion = navigator.userAgent.indexOf("Mac OS X 10.8") != -1;
-     const isOSXMavericks = navigator.userAgent.indexOf("Mac OS X 10.9") != -1;
-     const isOSXYosemite = navigator.userAgent.indexOf("Mac OS X 10.10") != -1;
+-    const isOSXLion = navigator.userAgent.includes("Mac OS X 10.7");
+-    const isOSXMtnLion = navigator.userAgent.includes("Mac OS X 10.8");
+     const isOSXMavericks = navigator.userAgent.includes("Mac OS X 10.9");
+     const isOSXYosemite = navigator.userAgent.includes("Mac OS X 10.10");
 -    if (isOSXLion || isOSXMtnLion || isOSXMavericks || isOSXYosemite) {
 +    if (isOSXMavericks || isOSXYosemite) {
          todo_is(win.windowState, win.STATE_MAXIMIZED,
@@ -65,7 +65,7 @@ diff --git a/toolkit/content/tests/chrome/test_bug624329.xul b/toolkit/content/t
 diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.properties b/toolkit/locales/en-US/chrome/global/aboutSupport.properties
 --- a/toolkit/locales/en-US/chrome/global/aboutSupport.properties
 +++ b/toolkit/locales/en-US/chrome/global/aboutSupport.properties
-@@ -128,18 +128,16 @@ multiProcessWindows = %1$S/%2$S (%3$S)
+@@ -132,18 +132,16 @@ multiProcessWindows = %1$S/%2$S (%3$S)
  multiProcessStatus.0 = Enabled by user
  multiProcessStatus.1 = Enabled by default
  multiProcessStatus.2 = Disabled

+ 6 - 5
comm-esr60/mozilla-esr60/patches/1437128-61a1.patch → rel-257/mozilla-esr60/patches/1437128-61a1.patch

@@ -2,14 +2,13 @@
 # User David Keeler <dkeeler@mozilla.com>
 # Date 1518207075 28800
 # Node ID faa9d965f89eca4a2fe8727149e6fa8d7a699604
-# Parent  bd27916752b333ca6d8843d75e0ee306e5b5c2e9
+# Parent  b02b1b474565f8e2793e932be8abcf45d2405ac9
 bug 1437128 - enforce that NSS_Shutdown succeeds on debug, non-android platforms (to prevent NSS resource leaks) r=erahm
 
 diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp
 --- a/xpcom/build/XPCOMInit.cpp
 +++ b/xpcom/build/XPCOMInit.cpp
-@@ -1026,25 +1026,24 @@ ShutdownXPCOM(nsIServiceManager* aServMg
-     JS_ShutDown();
+@@ -985,26 +985,24 @@ nsresult ShutdownXPCOM(nsIServiceManager
      sInitializedJS = false;
    }
  
@@ -17,6 +16,7 @@ diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp
    // down, any remaining objects that could be holding NSS resources (should)
    // have been released, so we can safely shut down NSS.
    if (NSS_IsInitialized()) {
+     SSL_ClearSessionCache();
 -    // It would be nice to enforce that this succeeds, at least on debug builds.
 -    // This would alert us to NSS resource leaks. Unfortunately there are some
 -    // architectural roadblocks in the way. Some tests (e.g. pkix gtests) need
@@ -24,8 +24,9 @@ diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp
 -    // meantime, just emit a warning. Chasing down these leaks is tracked in
 -    // bug 1230312.
      if (NSS_Shutdown() != SECSuccess) {
--      NS_WARNING("NSS_Shutdown failed - some NSS resources are still in use "
--                 "(see bugs 1417680 and 1230312)");
+-      NS_WARNING(
+-          "NSS_Shutdown failed - some NSS resources are still in use "
+-          "(see bugs 1417680 and 1230312)");
 +      // If you're seeing this crash and/or warning, some NSS resources are
 +      // still in use (see bugs 1417680 and 1230312).
 +#if defined(DEBUG) && !defined(ANDROID)

+ 94 - 0
rel-257/mozilla-esr60/patches/1439450-64a1.patch

@@ -0,0 +1,94 @@
+# HG changeset patch
+# User Dimi Lee <dlee@mozilla.com>
+# Date 1539686161 0
+# Node ID 37d138b1e58b9c45ee3baef530bb133597b14eb3
+# Parent  69de195e182f2774b0d8d393c852e7cf8d8df8ff
+Bug 1439450 - Ignore has_first_value() check in ProtocolParser. r=francois
+
+Sometimes the protocol buffer data (RiceEncodingData) sent by Google's Safe Browsing server has the following properties:
+
+1. |has_first_value| is false
+2. |num_entries| > 0
+
+In this case, we can still parse the data and apply partial update correctly by assuming that the first value is equal to 0.
+
+Differential Revision: https://phabricator.services.mozilla.com/D6393
+
+diff --git a/toolkit/components/url-classifier/ProtocolParser.cpp b/toolkit/components/url-classifier/ProtocolParser.cpp
+--- a/toolkit/components/url-classifier/ProtocolParser.cpp
++++ b/toolkit/components/url-classifier/ProtocolParser.cpp
+@@ -921,28 +921,29 @@ nsresult ProtocolParserProtobuf::Process
+     return rv;
+   }
+ 
+   return NS_OK;
+ }
+ 
+ static nsresult DoRiceDeltaDecode(const RiceDeltaEncoding& aEncoding,
+                                   nsTArray<uint32_t>& aDecoded) {
+-  if (!aEncoding.has_first_value()) {
+-    PARSER_LOG(("The encoding info is incomplete."));
+-    return NS_ERROR_UC_PARSER_MISSING_PARAM;
+-  }
+   if (aEncoding.num_entries() > 0 &&
+       (!aEncoding.has_rice_parameter() || !aEncoding.has_encoded_data())) {
+     PARSER_LOG(("Rice parameter or encoded data is missing."));
+     return NS_ERROR_UC_PARSER_MISSING_PARAM;
++  } else if (aEncoding.num_entries() == 0 && !aEncoding.has_first_value()) {
++    PARSER_LOG(("Missing first_value for an single-integer Rice encoding."));
++    return NS_ERROR_UC_PARSER_MISSING_VALUE;
+   }
+ 
++  auto first_value = aEncoding.has_first_value() ? aEncoding.first_value() : 0;
++
+   PARSER_LOG(("* Encoding info:"));
+-  PARSER_LOG(("  - First value: %" PRId64, aEncoding.first_value()));
++  PARSER_LOG(("  - First value: %" PRId64, first_value));
+   PARSER_LOG(("  - Num of entries: %d", aEncoding.num_entries()));
+   PARSER_LOG(("  - Rice parameter: %d", aEncoding.rice_parameter()));
+ 
+   // Set up the input buffer. Note that the bits should be read
+   // from LSB to MSB so that we in-place reverse the bits before
+   // feeding to the decoder.
+   auto encoded =
+       const_cast<RiceDeltaEncoding&>(aEncoding).mutable_encoded_data();
+@@ -953,17 +954,17 @@ static nsresult DoRiceDeltaDecode(const 
+   if (!aDecoded.SetLength(aEncoding.num_entries() + 1, mozilla::fallible)) {
+     NS_WARNING("Not enough memory to decode the RiceDelta input.");
+     return NS_ERROR_OUT_OF_MEMORY;
+   }
+ 
+   // Decode!
+   bool rv = decoder.Decode(
+       aEncoding.rice_parameter(),
+-      aEncoding.first_value(),  // first value.
++      first_value,
+       aEncoding.num_entries(),  // # of entries (first value not included).
+       &aDecoded[0]);
+ 
+   NS_ENSURE_TRUE(rv, NS_ERROR_UC_PARSER_DECODE_FAILURE);
+ 
+   return NS_OK;
+ }
+ 
+diff --git a/xpcom/base/ErrorList.py b/xpcom/base/ErrorList.py
+--- a/xpcom/base/ErrorList.py
++++ b/xpcom/base/ErrorList.py
+@@ -1104,16 +1104,17 @@ with modules["URL_CLASSIFIER"]:
+     errors["NS_ERROR_UC_UPDATE_TABLE_NOT_FOUND"] = FAILURE(8)
+     errors["NS_ERROR_UC_UPDATE_BUILD_PREFIX_FAILURE"] = FAILURE(9)
+     errors["NS_ERROR_UC_UPDATE_FAIL_TO_WRITE_DISK"] = FAILURE(10)
+ 
+     # Specific errors while parsing pver2/pver4 responses
+     errors["NS_ERROR_UC_PARSER_MISSING_PARAM"] = FAILURE(12)
+     errors["NS_ERROR_UC_PARSER_DECODE_FAILURE"] = FAILURE(13)
+     errors["NS_ERROR_UC_PARSER_UNKNOWN_THREAT"] = FAILURE(14)
++    errors["NS_ERROR_UC_PARSER_MISSING_VALUE"] = FAILURE(15)
+ 
+ 
+ # =======================================================================
+ # 43: NS_ERROR_MODULE_ERRORRESULT
+ # =======================================================================
+ with modules["ERRORRESULT"]:
+     # Represents a JS Value being thrown as an exception.
+     errors["NS_ERROR_INTERNAL_ERRORRESULT_JS_EXCEPTION"] = FAILURE(1)

+ 3 - 2
comm-esr60/mozilla-esr60/patches/1445969-61a1.patch → rel-257/mozilla-esr60/patches/1445969-61a1.patch

@@ -2,7 +2,7 @@
 # User Yan Or <yor@mozilla.com>
 # Date 1521581154 25200
 # Node ID 317c00f07c399fbe97abcea33029bc416e064347
-# Parent  8f6e692b8f6368dd1be1d6ba52666c60e871d543
+# Parent  6f4319fc1bd24a2b2be82a7375176397e1bbdfb6
 Bug 1445969 - removed obsolete code related to b2g r=sylvestre
 
 MozReview-Commit-ID: Hs3lI1nSKWi
@@ -10,7 +10,7 @@ MozReview-Commit-ID: Hs3lI1nSKWi
 diff --git a/js/src/make-source-package.sh b/js/src/make-source-package.sh
 --- a/js/src/make-source-package.sh
 +++ b/js/src/make-source-package.sh
-@@ -195,21 +195,17 @@ This release is based on a revision of M
+@@ -216,21 +216,17 @@ This release is based on a revision of M
  The changes in the patches/ directory were applied.
  
  MDN hosts the latest SpiderMonkey ${MOZJS_MAJOR_VERSION} release notes:
@@ -33,3 +33,4 @@ diff --git a/js/src/make-source-package.sh b/js/src/make-source-package.sh
          cp -pPR ${TOPSRCDIR}/patches ${tgtpath}
      fi
  
+

+ 84 - 0
rel-257/mozilla-esr60/patches/NOBUG-0c5f5c2e2a86-64a1.patch

@@ -0,0 +1,84 @@
+# HG changeset patch
+# User Jeff Gilbert <jgilbert@mozilla.com>
+# Date 1539382900 25200
+# Node ID 0c5f5c2e2a860f9f681e301662aabe2deca8be4b
+# Parent  cb2f2ac274e792f5fe518198c41e7fa12acc2beb
+No bug - Fix compiler warnings on Windows.
+
+diff --git a/dom/plugins/test/testplugin/nptest_windows.cpp b/dom/plugins/test/testplugin/nptest_windows.cpp
+--- a/dom/plugins/test/testplugin/nptest_windows.cpp
++++ b/dom/plugins/test/testplugin/nptest_windows.cpp
+@@ -58,18 +58,16 @@ struct _PlatformData {
+   ID2D1Factory* d2d1Factory;
+ };
+ 
+ bool pluginSupportsWindowMode() { return true; }
+ 
+ bool pluginSupportsWindowlessMode() { return true; }
+ 
+ NPError pluginInstanceInit(InstanceData* instanceData) {
+-  NPP npp = instanceData->npp;
+-
+   instanceData->platformData =
+       static_cast<PlatformData*>(NPN_MemAlloc(sizeof(PlatformData)));
+   if (!instanceData->platformData) return NPERR_OUT_OF_MEMORY_ERROR;
+ 
+   instanceData->platformData->childWindow = nullptr;
+   instanceData->platformData->device = nullptr;
+   instanceData->platformData->frontBuffer = nullptr;
+   instanceData->platformData->backBuffer = nullptr;
+diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp
+--- a/gfx/thebes/gfxGDIFontList.cpp
++++ b/gfx/thebes/gfxGDIFontList.cpp
+@@ -593,18 +593,18 @@ nsresult gfxGDIFontList::InitFontListFor
+   mNonExistingFonts.Clear();
+ 
+   // iterate over available families
+   LOGFONTW logfont;
+   memset(&logfont, 0, sizeof(logfont));
+   logfont.lfCharSet = DEFAULT_CHARSET;
+ 
+   AutoDC hdc;
+-  int result = EnumFontFamiliesExW(hdc.GetDC(), &logfont,
+-                                   (FONTENUMPROCW)&EnumFontFamExProc, 0, 0);
++  (void)EnumFontFamiliesExW(hdc.GetDC(), &logfont,
++                            (FONTENUMPROCW)&EnumFontFamExProc, 0, 0);
+ 
+   GetFontSubstitutes();
+ 
+   GetPrefsAndStartLoader();
+ 
+   return NS_OK;
+ }
+ 
+diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp
+--- a/gfx/thebes/gfxWindowsPlatform.cpp
++++ b/gfx/thebes/gfxWindowsPlatform.cpp
+@@ -1200,25 +1200,25 @@ bool gfxWindowsPlatform::IsOptimus() {
+         GetModuleHandleA("nvumdshimx.dll")) {
+       knowIsOptimus = 1;
+     } else {
+       knowIsOptimus = 0;
+     }
+   }
+   return knowIsOptimus;
+ }
+-
++/*
+ static inline bool IsWARPStable() {
+   // It seems like nvdxgiwrap makes a mess of WARP. See bug 1154703.
+   if (!IsWin8OrLater() || GetModuleHandleA("nvdxgiwrap.dll")) {
+     return false;
+   }
+   return true;
+ }
+-
++*/
+ static void InitializeANGLEConfig() {
+   FeatureState& d3d11ANGLE = gfxConfig::GetFeature(Feature::D3D11_HW_ANGLE);
+ 
+   if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
+     d3d11ANGLE.DisableByDefault(
+         FeatureStatus::Unavailable, "D3D11 compositing is disabled",
+         NS_LITERAL_CSTRING("FEATURE_FAILURE_D3D11_DISABLED"));
+     return;

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

@@ -2,3 +2,8 @@
 1473833-63a1.patch
 1460316-backout-1513900-lz.patch
 1460316-62a1.patch
+1439450-64a1.patch
+NOBUG-0c5f5c2e2a86-64a1.patch
+1336712-65a1.patch
+1437128-61a1.patch
+1445969-61a1.patch