Bug 1289211 - Rename InfallibleTArray to nsTArray in hal/ r=gsvelto
authorBarret Rennie <barret@brennie.ca>
Wed, 10 Jul 2019 03:30:52 +0000
changeset 482213 9d2191d704555dd3e535ad9b5c451919af3c8bb1
parent 482212 046ea1fda3f362f555ab98436736e445645ab5cd
child 482214 1d35ca0edcf9eb4900f22217b098950009927aed
push id36271
push useraiakab@mozilla.com
push dateWed, 10 Jul 2019 21:50:49 +0000
treeherdermozilla-central@e704e3565db9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgsvelto
bugs1289211
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1289211 - Rename InfallibleTArray to nsTArray in hal/ r=gsvelto Differential Revision: https://phabricator.services.mozilla.com/D36959
hal/WindowIdentifier.cpp
hal/WindowIdentifier.h
hal/cocoa/CocoaSensor.mm
hal/sandbox/SandboxHal.cpp
hal/windows/WindowsSensor.cpp
--- a/hal/WindowIdentifier.cpp
+++ b/hal/WindowIdentifier.cpp
@@ -14,26 +14,26 @@ namespace hal {
 
 WindowIdentifier::WindowIdentifier() : mWindow(nullptr), mIsEmpty(true) {}
 
 WindowIdentifier::WindowIdentifier(nsPIDOMWindowInner* window)
     : mWindow(window), mIsEmpty(false) {
   mID.AppendElement(GetWindowID());
 }
 
-WindowIdentifier::WindowIdentifier(const InfallibleTArray<uint64_t>& id,
+WindowIdentifier::WindowIdentifier(const nsTArray<uint64_t>& id,
                                    nsPIDOMWindowInner* window)
     : mID(id), mWindow(window), mIsEmpty(false) {
   mID.AppendElement(GetWindowID());
 }
 
 WindowIdentifier::WindowIdentifier(const WindowIdentifier& other)
     : mID(other.mID), mWindow(other.mWindow), mIsEmpty(other.mIsEmpty) {}
 
-const InfallibleTArray<uint64_t>& WindowIdentifier::AsArray() const {
+const nsTArray<uint64_t>& WindowIdentifier::AsArray() const {
   MOZ_ASSERT(!mIsEmpty);
   return mID;
 }
 
 bool WindowIdentifier::HasTraveledThroughIPC() const {
   MOZ_ASSERT(!mIsEmpty);
   return mID.Length() >= 2;
 }
--- a/hal/WindowIdentifier.h
+++ b/hal/WindowIdentifier.h
@@ -61,23 +61,22 @@ class WindowIdentifier {
    */
   explicit WindowIdentifier(nsPIDOMWindowInner* window);
 
   /**
    * Create a new WindowIdentifier with the given id array and window.
    * This automatically grabs the window's ID and appends it to the
    * array.
    */
-  WindowIdentifier(const InfallibleTArray<uint64_t>& id,
-                   nsPIDOMWindowInner* window);
+  WindowIdentifier(const nsTArray<uint64_t>& id, nsPIDOMWindowInner* window);
 
   /**
    * Get the list of window and process IDs we contain.
    */
-  typedef InfallibleTArray<uint64_t> IDArrayType;
+  typedef nsTArray<uint64_t> IDArrayType;
   const IDArrayType& AsArray() const;
 
   /**
    * Append the ID of the ContentChild singleton to our array of
    * window/process IDs.
    */
   void AppendProcessID();
 
--- a/hal/cocoa/CocoaSensor.mm
+++ b/hal/cocoa/CocoaSensor.mm
@@ -36,17 +36,17 @@ static float LMUvalueToLux(uint64_t aVal
   return lux > 0 ? lux : 0;
 }
 void UpdateHandler(nsITimer* aTimer, void* aClosure) {
   for (int i = 0; i < NUM_SENSOR_TYPE; i++) {
     if (!sActiveSensors[i]) {
       continue;
     }
     SensorType sensor = static_cast<SensorType>(i);
-    InfallibleTArray<float> values;
+    nsTArray<float> values;
     if (sensor == SENSOR_ACCELERATION) {
       sms_acceleration accel;
       smsGetData(&accel);
 
       values.AppendElement(accel.x * MEAN_GRAVITY);
       values.AppendElement(accel.y * MEAN_GRAVITY);
       values.AppendElement(accel.z * MEAN_GRAVITY);
     } else if (sensor == SENSOR_LIGHT && sDataPort != IO_OBJECT_NULL) {
--- a/hal/sandbox/SandboxHal.cpp
+++ b/hal/sandbox/SandboxHal.cpp
@@ -159,31 +159,31 @@ class HalParent : public PHalParent,
     hal::UnregisterScreenConfigurationObserver(this);
     for (auto sensor : MakeEnumeratedRange(NUM_SENSOR_TYPE)) {
       hal::UnregisterSensorObserver(sensor, this);
     }
     hal::UnregisterWakeLockObserver(this);
   }
 
   virtual mozilla::ipc::IPCResult RecvVibrate(
-      InfallibleTArray<unsigned int>&& pattern, InfallibleTArray<uint64_t>&& id,
+      nsTArray<unsigned int>&& pattern, nsTArray<uint64_t>&& id,
       PBrowserParent* browserParent) override {
     // We give all content vibration permission.
     //    BrowserParent *browserParent = BrowserParent::GetFrom(browserParent);
     /* xxxkhuey wtf
     nsCOMPtr<nsIDOMWindow> window =
       do_QueryInterface(browserParent->GetBrowserDOMWindow());
     */
     WindowIdentifier newID(id, nullptr);
     hal::Vibrate(pattern, newID);
     return IPC_OK();
   }
 
   virtual mozilla::ipc::IPCResult RecvCancelVibrate(
-      InfallibleTArray<uint64_t>&& id, PBrowserParent* browserParent) override {
+      nsTArray<uint64_t>&& id, PBrowserParent* browserParent) override {
     // BrowserParent *browserParent = BrowserParent::GetFrom(browserParent);
     /* XXXkhuey wtf
     nsCOMPtr<nsIDOMWindow> window =
       browserParent->GetBrowserDOMWindow();
     */
     WindowIdentifier newID(id, nullptr);
     hal::CancelVibrate(newID);
     return IPC_OK();
--- a/hal/windows/WindowsSensor.cpp
+++ b/hal/windows/WindowsSensor.cpp
@@ -58,17 +58,17 @@ class SensorEvent final : public ISensor
 
   STDMETHODIMP OnStateChanged(ISensor* aSensor, SensorState state) {
     return S_OK;
   }
 
   STDMETHODIMP OnDataUpdated(ISensor* aSensor, ISensorDataReport* aReport) {
     PROPVARIANT v;
     HRESULT hr;
-    InfallibleTArray<float> values;
+    nsTArray<float> values;
 
     // X-axis acceleration in g's
     hr = aReport->GetSensorValue(SENSOR_DATA_TYPE_ACCELERATION_X_G, &v);
     if (FAILED(hr)) {
       return hr;
     }
     values.AppendElement(float(-v.dblVal * MEAN_GRAVITY));