MFH: r471070

www/waterfox: update to 56.2.0.19

- Apply some FF61 fixes

Changes:	d2cdd42f41...01e6727879
Approved by:	ports-secteam blanket
This commit is contained in:
Jan Beich 2018-05-28 23:56:01 +00:00
parent c4982c4142
commit eff4f9e0ba
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q2/; revision=471072
5 changed files with 156 additions and 6 deletions

View File

@ -1,9 +1,8 @@
# $FreeBSD$
PORTNAME= waterfox
DISTVERSION= 56.2.0-13
DISTVERSIONSUFFIX= -gd2cdd42f4115b
PORTREVISION= 5
DISTVERSION= 56.2.0-19
DISTVERSIONSUFFIX= -g01e6727879b2a
CATEGORIES= www ipv6
MAINTAINER= jbeich@FreeBSD.org

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1526579170
SHA256 (MrAlex94-Waterfox-56.2.0-13-gd2cdd42f4115b_GH0.tar.gz) = 3722c20ec52309b1b184e0c82d15ebd2bf0d793c3306099028f789415256c6ca
SIZE (MrAlex94-Waterfox-56.2.0-13-gd2cdd42f4115b_GH0.tar.gz) = 395161904
TIMESTAMP = 1527436132
SHA256 (MrAlex94-Waterfox-56.2.0-19-g01e6727879b2a_GH0.tar.gz) = 18a5714a9fe899e1939170a744d27e4ca8092ca4ef53054f1d26e0b7d6b0e483
SIZE (MrAlex94-Waterfox-56.2.0-19-g01e6727879b2a_GH0.tar.gz) = 395151801

View File

@ -0,0 +1,66 @@
commit dc0965023fb7
Author: Randell Jesup <rjesup@jesup.org>
Date: Mon May 21 15:30:35 2018 -0400
Bug 1425930 - Handle Broadcast()->Notify() calling RemoveObserver(). r=froydnj, a=abillings
--HG--
extra : source : a314710b0acd38afc7de74f0306f514b50d84463
---
xpcom/ds/Observer.h | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git xpcom/ds/Observer.h xpcom/ds/Observer.h
index 958e5e4a9694e..83d650a936ccc 100644
--- xpcom/ds/Observer.h
+++ xpcom/ds/Observer.h
@@ -57,7 +57,17 @@ public:
*/
bool RemoveObserver(Observer<T>* aObserver)
{
- return mObservers.RemoveElement(aObserver);
+ if (mObservers.RemoveElement(aObserver)) {
+ if (!mBroadcastCopy.IsEmpty()) {
+ // Annoyingly, someone could RemoveObserver() an item on the list
+ // while we're in a Broadcast()'s Notify() call.
+ auto i = mBroadcastCopy.IndexOf(aObserver);
+ MOZ_ASSERT(i != mBroadcastCopy.NoIndex);
+ mBroadcastCopy[i] = nullptr;
+ }
+ return true;
+ }
+ return false;
}
uint32_t Length()
@@ -65,17 +75,27 @@ public:
return mObservers.Length();
}
+ /**
+ * Call Notify() on each item in the list.
+ * Handles the case of Notify() calling RemoveObserver()
+ */
void Broadcast(const T& aParam)
{
- nsTArray<Observer<T>*> observersCopy(mObservers);
- uint32_t size = observersCopy.Length();
+ MOZ_ASSERT(mBroadcastCopy.IsEmpty());
+ mBroadcastCopy = mObservers;
+ uint32_t size = mBroadcastCopy.Length();
for (uint32_t i = 0; i < size; ++i) {
- observersCopy[i]->Notify(aParam);
+ // nulled if Removed during Broadcast
+ if (mBroadcastCopy[i]) {
+ mBroadcastCopy[i]->Notify(aParam);
+ }
}
+ mBroadcastCopy.Clear();
}
protected:
nsTArray<Observer<T>*> mObservers;
+ nsTArray<Observer<T>*> mBroadcastCopy;
};
} // namespace mozilla

View File

@ -0,0 +1,35 @@
commit 7f6f5a06a070
Author: Nils Ohlmeier [:drno] <drno@ohlmeier.org>
Date: Wed May 16 09:51:35 2018 -0700
Bug 1439236 - Exit early if m_copym gets called with null ptr. r=dminor, a=RyanVM
Cheery-picked upstream commit:
https://github.com/sctplab/usrsctp/commit/d89882d04900c80860874b5eb389b3ed3a0bca3d
MozReview-Commit-ID: 36bYbfIaqEz
--HG--
extra : source : 2755492fe3d1daa9dd6066b049bc7bb5941b28e9
---
netwerk/sctp/src/user_mbuf.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git netwerk/sctp/src/user_mbuf.c netwerk/sctp/src/user_mbuf.c
index ec83931e66e5a..bd17f9fbada60 100755
--- netwerk/sctp/src/user_mbuf.c
+++ netwerk/sctp/src/user_mbuf.c
@@ -987,6 +987,13 @@ m_copym(struct mbuf *m, int off0, int len, int wait)
KASSERT(off >= 0, ("m_copym, negative off %d", off));
KASSERT(len >= 0, ("m_copym, negative len %d", len));
+ KASSERT(m != NULL, ("m_copym, m is NULL"));
+
+#if !defined(INVARIANTS)
+ if (m == NULL) {
+ return (NULL);
+ }
+#endif
if (off == 0 && m->m_flags & M_PKTHDR)
copyhdr = 1;

View File

@ -0,0 +1,50 @@
commit 2314ad56620e
Author: Randell Jesup <rjesup@jesup.org>
Date: Fri May 25 21:16:28 2018 -0400
Bug 1463494 - Delete the sensor observerlist array in a deferred manner. r=froydnj, r=jchen, a=abillings
Clean up sensorlist if Dispatch fails.
--HG--
extra : source : 494d77b62c333c2b71097d4ecf41c1a60dc495a2
---
hal/Hal.cpp | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git hal/Hal.cpp hal/Hal.cpp
index ddd7121a91dd1..6b389407f737a 100644
--- hal/Hal.cpp
+++ hal/Hal.cpp
@@ -439,14 +439,29 @@ UnregisterSensorObserver(SensorType aSensor, ISensorObserver *aObserver) {
}
DisableSensorNotifications(aSensor);
- // Destroy sSensorObservers only if all observer lists are empty.
for (int i = 0; i < NUM_SENSOR_TYPE; i++) {
if (gSensorObservers[i].Length() > 0) {
return;
}
}
- delete [] gSensorObservers;
+
+ // We want to destroy gSensorObservers if all observer lists are
+ // empty, but we have to defer the deallocation via a runnable to
+ // mainthread (since we may be inside NotifySensorChange()/Broadcast()
+ // when it calls UnregisterSensorObserver()).
+ SensorObserverList* sensorlists = gSensorObservers;
gSensorObservers = nullptr;
+
+ // Unlike DispatchToMainThread, DispatchToCurrentThread doesn't leak a runnable if
+ // it fails (and we assert we're on MainThread).
+ if (NS_FAILED(NS_DispatchToCurrentThread(NS_NewRunnableFunction("UnregisterSensorObserver",
+ [sensorlists]() -> void {
+ delete [] sensorlists;
+ }))))
+ {
+ // Still need to delete sensorlists if the dispatch fails
+ delete [] sensorlists;
+ }
}
void