Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2018 00:39:51 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r474046 - in head/www/waterfox: . files
Message-ID:  <201807070039.w670dp3x029446@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat Jul  7 00:39:51 2018
New Revision: 474046
URL: https://svnweb.freebsd.org/changeset/ports/474046

Log:
  www/waterfox: apply some FF62 fixes

Added:
  head/www/waterfox/files/patch-bug1469309   (contents, props changed)
  head/www/waterfox/files/patch-bug1469914   (contents, props changed)
Modified:
  head/www/waterfox/Makefile   (contents, props changed)

Modified: head/www/waterfox/Makefile
==============================================================================
--- head/www/waterfox/Makefile	Sat Jul  7 00:39:34 2018	(r474045)
+++ head/www/waterfox/Makefile	Sat Jul  7 00:39:51 2018	(r474046)
@@ -3,7 +3,7 @@
 PORTNAME=	waterfox
 DISTVERSION=	56.2.1-55
 DISTVERSIONSUFFIX=	-g6395bf177f76a
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www ipv6
 
 MAINTAINER=	jbeich@FreeBSD.org

Added: head/www/waterfox/files/patch-bug1469309
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/waterfox/files/patch-bug1469309	Sat Jul  7 00:39:51 2018	(r474046)
@@ -0,0 +1,72 @@
+commit ff627ab4afeb
+Author: Gabriele Svelto <gsvelto@mozilla.com>
+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<mozilla::hal::SensorType>:
+     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);
+   }

Added: head/www/waterfox/files/patch-bug1469914
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/waterfox/files/patch-bug1469914	Sat Jul  7 00:39:51 2018	(r474046)
@@ -0,0 +1,118 @@
+commit 051d1b6a48a7
+Author: Gabriele Svelto <gsvelto@mozilla.com>
+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<T>* aObserver)
+   {
+-    mObservers.AppendElement(aObserver);
++    mObservers.AppendElementUnlessExists(aObserver);
+   }
+ 
+   /**
+@@ -57,17 +57,7 @@ public:
+    */
+   bool RemoveObserver(Observer<T>* 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<Observer<T>*>::ForwardIterator iter(mObservers);
++    while (iter.HasMore()) {
++      Observer<T>* obs = iter.GetNext();
++      obs->Notify(aParam);
+     }
+-    mBroadcastCopy.Clear();
+   }
+ 
+ protected:
+-  nsTArray<Observer<T>*> mObservers;
+-  nsTArray<Observer<T>*> mBroadcastCopy;
++  nsTObserverArray<Observer<T>*> mObservers;
+ };
+ 
+ } // namespace mozilla



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807070039.w670dp3x029446>