Index: branches/2018Q3/www/waterfox/Makefile =================================================================== --- branches/2018Q3/www/waterfox/Makefile (revision 479823) +++ branches/2018Q3/www/waterfox/Makefile (revision 479824) @@ -1,76 +1,76 @@ # $FreeBSD$ PORTNAME= waterfox -DISTVERSION= 56.2.2 +DISTVERSION= 56.2.3 CATEGORIES= www ipv6 MAINTAINER= jbeich@FreeBSD.org COMMENT= Distilled fork of Firefox DEPRECATED= Temporary experiment EXPIRATION_DATE=2018-09-27 BUILD_DEPENDS= nspr>=4.16:devel/nspr \ nss>=3.32.1:security/nss \ icu>=59.1,1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=1.4.7:print/harfbuzz \ graphite2>=1.3.10:graphics/graphite2 \ png>=1.6.31:graphics/png \ libvorbis>=1.3.5,3:audio/libvorbis \ libvpx>=1.5.0:multimedia/libvpx \ sqlite3>=3.19.3:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ yasm:devel/yasm \ zip:archivers/zip # soundtouch>=1.9.0:audio/soundtouch \ LIB_DEPENDS= libv4l2.so:multimedia/libv4l USE_GITHUB= yes GH_ACCOUNT= MrAlex94 GH_PROJECT= Waterfox USE_GECKO= gecko MOZ_PKGCONFIG_FILES= # empty USE_MOZILLA= -soundtouch MOZILLA_NAME= Waterfox USE_GL= gl WATERFOX_ICON= ${MOZILLA}.png WATERFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default256.png WATERFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop MOZ_OPTIONS= --enable-application=browser \ --with-app-name=${MOZILLA} \ --with-app-basename=${MOZILLA_NAME} \ --with-distribution-id=org.${MOZILLA}project OPTIONS_DEFAULT= BUNDLED_CAIRO .include "${.CURDIR}/../../www/firefox/Makefile.options" # Inconsistent fallback order (libcubeb vs. audio_device) SNDIO_PREVENTS= ${OPTIONS_MULTI_AUDIO:NSNDIO} post-patch: @${REINPLACE_CMD} -e 's/%u/%U/' -e '/X-MultipleArgs/d' \ -e 's/firefox/${MOZILLA}/' \ -e 's/Firefox/${MOZILLA_NAME}/' \ ${WATERFOX_DESKTOP} @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp pre-configure: (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13) (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13) post-install: ${INSTALL_DATA} ${WATERFOX_DESKTOP} \ ${STAGEDIR}${PREFIX}/share/applications/${MOZILLA}.desktop ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${LN} -sf ${WATERFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${WATERFOX_ICON} .include Index: branches/2018Q3/www/waterfox/distinfo =================================================================== --- branches/2018Q3/www/waterfox/distinfo (revision 479823) +++ branches/2018Q3/www/waterfox/distinfo (revision 479824) @@ -1,3 +1,3 @@ -TIMESTAMP = 1531411206 -SHA256 (MrAlex94-Waterfox-56.2.2_GH0.tar.gz) = cdca42bb619f0a4dedf216c78fe965775fd5e6cb14c8b5e677fe264b1f5667b2 -SIZE (MrAlex94-Waterfox-56.2.2_GH0.tar.gz) = 395130444 +TIMESTAMP = 1536644593 +SHA256 (MrAlex94-Waterfox-56.2.3_GH0.tar.gz) = 6134501bf3325d3bcd9632405a46f1f1278988e57bf4ca88b61926eb49ef1465 +SIZE (MrAlex94-Waterfox-56.2.3_GH0.tar.gz) = 395126627 Index: branches/2018Q3/www/waterfox/files/patch-bug1469309 =================================================================== --- branches/2018Q3/www/waterfox/files/patch-bug1469309 (revision 479823) +++ branches/2018Q3/www/waterfox/files/patch-bug1469309 (nonexistent) @@ -1,72 +0,0 @@ -commit ff627ab4afeb -Author: Gabriele Svelto -Date: Tue Jun 19 09:18:09 2018 +0200 - - Bug 1469309 - Remove an unused sensor type; r=agaynor a=lizzard - - --HG-- - extra : source : 12d7dd36b8ccb80e866d0da7fcb7e44fcb690b0b - extra : intermediate-source : 3dd88f4a8884fe4327fc08588dce1fe221c45bcb ---- - hal/Hal.cpp | 1 + - hal/HalSensor.h | 3 +-- - hal/sandbox/SandboxHal.cpp | 6 +++--- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git hal/Hal.cpp hal/Hal.cpp -index e03b7fdfab2f6..7845d5072ee53 100644 ---- hal/Hal.cpp -+++ hal/Hal.cpp -@@ -426,6 +426,7 @@ UnregisterSensorObserver(SensorType aSensor, ISensorObserver *aObserver) { - AssertMainThread(); - - if (!gSensorObservers) { -+ HAL_ERR("Un-registering a sensor when none have been registered"); - return; - } - -diff --git hal/HalSensor.h hal/HalSensor.h -index 551c4271d5395..5175629c9ab33 100644 ---- hal/HalSensor.h -+++ hal/HalSensor.h -@@ -18,7 +18,6 @@ namespace hal { - * If you add or change any here, do the same in GeckoHalDefines.java. - */ - enum SensorType { -- SENSOR_UNKNOWN = -1, - SENSOR_ORIENTATION = 0, - SENSOR_ACCELERATION = 1, - SENSOR_PROXIMITY = 2, -@@ -63,7 +62,7 @@ namespace IPC { - struct ParamTraits: - public ContiguousEnumSerializer< - mozilla::hal::SensorType, -- mozilla::hal::SENSOR_UNKNOWN, -+ mozilla::hal::SENSOR_ORIENTATION, - mozilla::hal::NUM_SENSOR_TYPE> { - }; - -diff --git hal/sandbox/SandboxHal.cpp hal/sandbox/SandboxHal.cpp -index 73b106da73d0a..cf0ccb483ed57 100644 ---- hal/sandbox/SandboxHal.cpp -+++ hal/sandbox/SandboxHal.cpp -@@ -16,6 +16,7 @@ - #include "mozilla/dom/network/Types.h" - #include "mozilla/dom/ScreenOrientation.h" - #include "mozilla/fallback/FallbackScreenConfiguration.h" -+#include "mozilla/EnumeratedRange.h" - #include "mozilla/Observer.h" - #include "mozilla/Unused.h" - #include "nsAutoPtr.h" -@@ -232,9 +233,8 @@ public: - hal::UnregisterBatteryObserver(this); - hal::UnregisterNetworkObserver(this); - hal::UnregisterScreenConfigurationObserver(this); -- for (int32_t sensor = SENSOR_UNKNOWN + 1; -- sensor < NUM_SENSOR_TYPE; ++sensor) { -- hal::UnregisterSensorObserver(SensorType(sensor), this); -+ for (auto sensor : MakeEnumeratedRange(NUM_SENSOR_TYPE)) { -+ hal::UnregisterSensorObserver(sensor, this); - } - hal::UnregisterWakeLockObserver(this); - } Property changes on: branches/2018Q3/www/waterfox/files/patch-bug1469309 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/www/waterfox/files/patch-bug1472925 =================================================================== --- branches/2018Q3/www/waterfox/files/patch-bug1472925 (revision 479823) +++ branches/2018Q3/www/waterfox/files/patch-bug1472925 (nonexistent) @@ -1,83 +0,0 @@ -commit 8ffab3ae0ea3 -Author: Karl Tomlinson -Date: Tue Jul 3 17:23:09 2018 +1200 - - Bug 1472925 - Keep a strong reference to MediaStreamGraph from GraphDriver. r=padenot, a=lizzard ---- - dom/media/GraphDriver.cpp | 7 ++++--- - dom/media/GraphDriver.h | 6 ++---- - dom/media/MediaStreamGraph.cpp | 3 ++- - 3 files changed, 8 insertions(+), 8 deletions(-) - -diff --git dom/media/GraphDriver.cpp dom/media/GraphDriver.cpp -index fd003ac9dbc6a..197debf299582 100644 ---- dom/media/GraphDriver.cpp -+++ dom/media/GraphDriver.cpp -@@ -179,7 +179,8 @@ class MediaStreamGraphInitThreadRunnable : public Runn - NS_IMETHOD Run() override - { - LOG(LogLevel::Debug, -- ("Starting a new system driver for graph %p", mDriver->mGraphImpl)); -+ ("Starting a new system driver for graph %p", -+ mDriver->mGraphImpl.get())); - - RefPtr previousDriver; - { -@@ -217,7 +218,7 @@ void - ThreadedDriver::Start() - { - LOG(LogLevel::Debug, -- ("Starting thread for a SystemClockDriver %p", mGraphImpl)); -+ ("Starting thread for a SystemClockDriver %p", mGraphImpl.get())); - Unused << NS_WARN_IF(mThread); - if (!mThread) { // Ensure we haven't already started it - nsCOMPtr event = new MediaStreamGraphInitThreadRunnable(this); -@@ -784,7 +785,7 @@ void - AudioCallbackDriver::Resume() - { - LOG(LogLevel::Debug, -- ("Resuming audio threads for MediaStreamGraph %p", mGraphImpl)); -+ ("Resuming audio threads for MediaStreamGraph %p", mGraphImpl.get())); - if (cubeb_stream_start(mAudioStream) != CUBEB_OK) { - NS_WARNING("Could not start cubeb stream for MSG."); - } -@@ -859,7 +860,7 @@ AudioCallbackDriver::Revive() - } else { - LOG(LogLevel::Debug, - ("Starting audio threads for MediaStreamGraph %p from a new thread.", -- mGraphImpl)); -+ mGraphImpl.get())); - RefPtr initEvent = - new AsyncCubebTask(this, AsyncCubebOperation::INIT); - initEvent->Dispatch(); -diff --git dom/media/GraphDriver.h dom/media/GraphDriver.h -index 5c085dc36bff5..ca77b5752569f 100644 ---- dom/media/GraphDriver.h -+++ dom/media/GraphDriver.h -@@ -211,10 +211,8 @@ protected: - // Time of the end of this graph iteration. This must be accessed while having - // the monitor. - GraphTime mIterationEnd; -- // The MediaStreamGraphImpl that owns this driver. This has a lifetime longer -- // than the driver, and will never be null. Hence, it can be accesed without -- // monitor. -- MediaStreamGraphImpl* mGraphImpl; -+ // The MediaStreamGraphImpl associated with this driver. -+ const RefPtr mGraphImpl; - - // This is used on the main thread (during initialization), and the graph - // thread. No monitor needed because we know the graph thread does not run -diff --git dom/media/MediaStreamGraph.cpp dom/media/MediaStreamGraph.cpp -index a3c8b26c2663d..4e6175e0d9fed 100644 ---- dom/media/MediaStreamGraph.cpp -+++ dom/media/MediaStreamGraph.cpp -@@ -3661,7 +3661,8 @@ MediaStreamGraphImpl::Destroy() - // First unregister from memory reporting. - UnregisterWeakMemoryReporter(this); - -- // Clear the self reference which will destroy this instance. -+ // Clear the self reference which will destroy this instance if all -+ // associated GraphDrivers are destroyed. - mSelfRef = nullptr; - } - Property changes on: branches/2018Q3/www/waterfox/files/patch-bug1472925 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/www/waterfox/files/patch-bug1470260 =================================================================== --- branches/2018Q3/www/waterfox/files/patch-bug1470260 (revision 479823) +++ branches/2018Q3/www/waterfox/files/patch-bug1470260 (nonexistent) @@ -1,164 +0,0 @@ -commit bb90f9b13b2d -Author: Mats Palmgren -Date: Sat Jun 30 01:08:54 2018 +0200 - - Bug 1470260 part 1 - Ensure that 'this' stays alive for the duration of the TickRefreshDriver call. r=emilio a=lizzard - - --HG-- - extra : source : 89db79608a7565ead4ceca4db9e2417b1373e41d ---- - layout/base/nsRefreshDriver.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git layout/base/nsRefreshDriver.cpp layout/base/nsRefreshDriver.cpp -index 3e468c17ad300..446fcf3f243a8 100644 ---- layout/base/nsRefreshDriver.cpp -+++ layout/base/nsRefreshDriver.cpp -@@ -537,6 +537,9 @@ private: - - bool NotifyVsync(TimeStamp aVsyncTimestamp) override - { -+ // IMPORTANT: All paths through this method MUST hold a strong ref on -+ // |this| for the duration of the TickRefreshDriver callback. -+ - if (!NS_IsMainThread()) { - MOZ_ASSERT(XRE_IsParentProcess()); - // Compress vsync notifications such that only 1 may run at a time -@@ -571,6 +574,7 @@ private: - return true; - } - -+ RefPtr kungFuDeathGrip(this); - TickRefreshDriver(aVsyncTimestamp); - } - - -commit 06c64e041c90 -Author: Mats Palmgren -Date: Mon Jul 2 19:19:29 2018 +0300 - - Bug 1470260 part 2 - Make RefreshDriverTimer ref-counted and hold a strong ref on it on the stack when nsRefreshDriver::Tick can be reached. r=emilio a=lizzard - - --HG-- - extra : rebase_source : 817d92ed5dc53ff45d6d2818ccf8b08538cf397b ---- - layout/base/nsRefreshDriver.cpp | 42 ++++++++++++++++++++--------------------- - 1 file changed, 21 insertions(+), 21 deletions(-) - -diff --git layout/base/nsRefreshDriver.cpp layout/base/nsRefreshDriver.cpp -index 446fcf3f243a8..fd7b268d90d07 100644 ---- layout/base/nsRefreshDriver.cpp -+++ layout/base/nsRefreshDriver.cpp -@@ -148,11 +148,7 @@ public: - { - } - -- virtual ~RefreshDriverTimer() -- { -- MOZ_ASSERT(mContentRefreshDrivers.Length() == 0, "Should have removed all content refresh drivers from here by now!"); -- MOZ_ASSERT(mRootRefreshDrivers.Length() == 0, "Should have removed all root refresh drivers from here by now!"); -- } -+ NS_INLINE_DECL_REFCOUNTING(RefreshDriverTimer) - - virtual void AddRefreshDriver(nsRefreshDriver* aDriver) - { -@@ -259,6 +255,12 @@ public: - } - - protected: -+ virtual ~RefreshDriverTimer() -+ { -+ MOZ_ASSERT(mContentRefreshDrivers.Length() == 0, "Should have removed all content refresh drivers from here by now!"); -+ MOZ_ASSERT(mRootRefreshDrivers.Length() == 0, "Should have removed all root refresh drivers from here by now!"); -+ } -+ - virtual void StartTimer() = 0; - virtual void StopTimer() = 0; - virtual void ScheduleNextTick(TimeStamp aNowTime) = 0; -@@ -336,10 +338,11 @@ protected: - nsTArray> mRootRefreshDrivers; - - // useful callback for nsITimer-based derived classes, here -- // bacause of c++ protected shenanigans -+ // because of c++ protected shenanigans - static void TimerTick(nsITimer* aTimer, void* aClosure) - { -- RefreshDriverTimer *timer = static_cast(aClosure); -+ RefPtr timer = -+ static_cast(aClosure); - timer->Tick(); - } - }; -@@ -471,9 +474,7 @@ public: - private: - // Since VsyncObservers are refCounted, but the RefreshDriverTimer are - // explicitly shutdown. We create an inner class that has the VsyncObserver -- // and is shutdown when the RefreshDriverTimer is deleted. The alternative is -- // to (a) make all RefreshDriverTimer RefCounted or (b) use different -- // VsyncObserver types. -+ // and is shutdown when the RefreshDriverTimer is deleted. - class RefreshDriverVsyncObserver final : public VsyncObserver - { - public: -@@ -674,7 +675,9 @@ private: - // the scheduled TickRefreshDriver() runs. Check mVsyncRefreshDriverTimer - // before use. - if (mVsyncRefreshDriverTimer) { -- mVsyncRefreshDriverTimer->RunRefreshDrivers(aVsyncTimestamp); -+ RefPtr timer = mVsyncRefreshDriverTimer; -+ timer->RunRefreshDrivers(aVsyncTimestamp); -+ // Note: mVsyncRefreshDriverTimer might be null now. - } - - if (!XRE_IsParentProcess()) { -@@ -956,7 +959,8 @@ protected: - - static void TimerTickOne(nsITimer* aTimer, void* aClosure) - { -- InactiveRefreshDriverTimer *timer = static_cast(aClosure); -+ RefPtr timer = -+ static_cast(aClosure); - timer->TickOne(); - } - -@@ -967,8 +971,8 @@ protected: - - } // namespace mozilla - --static RefreshDriverTimer* sRegularRateTimer; --static InactiveRefreshDriverTimer* sThrottledRateTimer; -+static StaticRefPtr sRegularRateTimer; -+static StaticRefPtr sThrottledRateTimer; - - static void - CreateContentVsyncRefreshTimer(void*) -@@ -1042,9 +1046,6 @@ GetFirstFrameDelay(imgIRequest* req) - nsRefreshDriver::Shutdown() - { - // clean up our timers -- delete sRegularRateTimer; -- delete sThrottledRateTimer; -- - sRegularRateTimer = nullptr; - sThrottledRateTimer = nullptr; - } -@@ -2292,16 +2293,15 @@ nsRefreshDriver::PVsyncActorCreated(VsyncChild* aVsyncChild) - { - MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(!XRE_IsParentProcess()); -- auto* vsyncRefreshDriverTimer = -- new VsyncRefreshDriverTimer(aVsyncChild); -+ RefPtr vsyncRefreshDriverTimer = -+ new VsyncRefreshDriverTimer(aVsyncChild); - - // If we are using software timer, swap current timer to - // VsyncRefreshDriverTimer. - if (sRegularRateTimer) { - sRegularRateTimer->SwapRefreshDrivers(vsyncRefreshDriverTimer); -- delete sRegularRateTimer; - } -- sRegularRateTimer = vsyncRefreshDriverTimer; -+ sRegularRateTimer = vsyncRefreshDriverTimer.forget(); - } - - void Property changes on: branches/2018Q3/www/waterfox/files/patch-bug1470260 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/www/waterfox/files/patch-bug1425930 =================================================================== --- branches/2018Q3/www/waterfox/files/patch-bug1425930 (revision 479823) +++ branches/2018Q3/www/waterfox/files/patch-bug1425930 (nonexistent) @@ -1,66 +0,0 @@ -commit dc0965023fb7 -Author: Randell Jesup -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* 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*> 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*> mObservers; -+ nsTArray*> mBroadcastCopy; - }; - - } // namespace mozilla Property changes on: branches/2018Q3/www/waterfox/files/patch-bug1425930 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3/www/waterfox/files/patch-bug1469914 =================================================================== --- branches/2018Q3/www/waterfox/files/patch-bug1469914 (revision 479823) +++ branches/2018Q3/www/waterfox/files/patch-bug1469914 (nonexistent) @@ -1,118 +0,0 @@ -commit 051d1b6a48a7 -Author: Gabriele Svelto -Date: Fri Jun 22 00:35:08 2018 +0200 - - Bug 1469914 - Prevent the HAL from registering duplicate observers; r=froydnj a=lizzard - - This also replaces the custom logic in ObserverList with an nsTObserverArray - which has all the necessary logic for stable iteration over a potentially - changing list of items. Unused dependencies were also removed. - - --HG-- - extra : source : 303478f7f248470a1c747f42dad9cb85c3129f0a - extra : intermediate-source : 8e6dea408b0ee63ec1c675b8b0293c0ee2d100dd ---- - hal/Hal.cpp | 3 --- - hal/Hal.h | 1 - - xpcom/ds/Observer.h | 33 ++++++++------------------------- - 3 files changed, 8 insertions(+), 29 deletions(-) - -diff --git hal/Hal.cpp hal/Hal.cpp -index 1b32db73e2508..e03b7fdfab2f6 100644 ---- hal/Hal.cpp -+++ hal/Hal.cpp -@@ -20,10 +20,7 @@ - #include "nsJSUtils.h" - #include "mozilla/ClearOnShutdown.h" - #include "mozilla/Observer.h" --#include "mozilla/Services.h" --#include "mozilla/StaticPtr.h" - #include "mozilla/dom/ContentChild.h" --#include "mozilla/dom/ContentParent.h" - #include "mozilla/dom/ScreenOrientation.h" - #include "WindowIdentifier.h" - -diff --git hal/Hal.h hal/Hal.h -index 787b7ed5f3890..311c5c8b50118 100644 ---- hal/Hal.h -+++ hal/Hal.h -@@ -17,7 +17,6 @@ - #include "mozilla/hal_sandbox/PHal.h" - #include "mozilla/HalScreenConfiguration.h" - #include "mozilla/HalTypes.h" --#include "mozilla/Observer.h" - #include "mozilla/Types.h" - - /* -diff --git xpcom/ds/Observer.h xpcom/ds/Observer.h -index 83d650a936ccc..9e782949c8e5e 100644 ---- xpcom/ds/Observer.h -+++ xpcom/ds/Observer.h -@@ -7,7 +7,7 @@ - #ifndef mozilla_Observer_h - #define mozilla_Observer_h - --#include "nsTArray.h" -+#include "nsTObserverArray.h" - - namespace mozilla { - -@@ -48,7 +48,7 @@ public: - */ - void AddObserver(Observer* aObserver) - { -- mObservers.AppendElement(aObserver); -+ mObservers.AppendElementUnlessExists(aObserver); - } - - /** -@@ -57,17 +57,7 @@ public: - */ - bool RemoveObserver(Observer* 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; -+ return mObservers.RemoveElement(aObserver); - } - - uint32_t Length() -@@ -77,25 +67,18 @@ public: - - /** - * Call Notify() on each item in the list. -- * Handles the case of Notify() calling RemoveObserver() - */ - void Broadcast(const T& aParam) - { -- MOZ_ASSERT(mBroadcastCopy.IsEmpty()); -- mBroadcastCopy = mObservers; -- uint32_t size = mBroadcastCopy.Length(); -- for (uint32_t i = 0; i < size; ++i) { -- // nulled if Removed during Broadcast -- if (mBroadcastCopy[i]) { -- mBroadcastCopy[i]->Notify(aParam); -- } -+ typename nsTObserverArray*>::ForwardIterator iter(mObservers); -+ while (iter.HasMore()) { -+ Observer* obs = iter.GetNext(); -+ obs->Notify(aParam); - } -- mBroadcastCopy.Clear(); - } - - protected: -- nsTArray*> mObservers; -- nsTArray*> mBroadcastCopy; -+ nsTObserverArray*> mObservers; - }; - - } // namespace mozilla Property changes on: branches/2018Q3/www/waterfox/files/patch-bug1469914 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: branches/2018Q3 =================================================================== --- branches/2018Q3 (revision 479823) +++ branches/2018Q3 (revision 479824) Property changes on: branches/2018Q3 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r479823