Skip to content

Commit

Permalink
Bug 1289211 - Rename InfallibleTArray to nsTArray in hal/ r=gsvelto
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D36959

--HG--
extra : moz-landing-system : lando
  • Loading branch information
Barret Rennie committed Jul 10, 2019
1 parent cb1609a commit 119f8b6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions hal/WindowIdentifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ WindowIdentifier::WindowIdentifier(nsPIDOMWindowInner* window)
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());
Expand All @@ -28,7 +28,7 @@ WindowIdentifier::WindowIdentifier(const InfallibleTArray<uint64_t>& id,
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;
}
Expand Down
5 changes: 2 additions & 3 deletions hal/WindowIdentifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,12 @@ class WindowIdentifier {
* 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;

/**
Expand Down
2 changes: 1 addition & 1 deletion hal/cocoa/CocoaSensor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void UpdateHandler(nsITimer* aTimer, void* aClosure) {
continue;
}
SensorType sensor = static_cast<SensorType>(i);
InfallibleTArray<float> values;
nsTArray<float> values;
if (sensor == SENSOR_ACCELERATION) {
sms_acceleration accel;
smsGetData(&accel);
Expand Down
4 changes: 2 additions & 2 deletions hal/sandbox/SandboxHal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class HalParent : public PHalParent,
}

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);
Expand All @@ -178,7 +178,7 @@ class HalParent : public PHalParent,
}

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 =
Expand Down
2 changes: 1 addition & 1 deletion hal/windows/WindowsSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SensorEvent final : public ISensorEvents {
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);
Expand Down

0 comments on commit 119f8b6

Please sign in to comment.