Bug 1562453 - Remove uint32 clamping tests, which have no effect r=thomasmo
authorKearwood "Kip" Gilbert <kgilbert@mozilla.com>
Tue, 02 Jul 2019 18:52:46 +0000
changeset 481056 6f1b37c88772b348da936a0e61543bb72f750b17
parent 481055 499fb7e4665fece2e09687d504e20ec1b62f4ce4
child 481057 a4e82d6fdd5b746cd551bfadbe9fb446ff6a9e7b
push id89057
push userkgilbert@mozilla.com
push dateWed, 03 Jul 2019 00:46:02 +0000
treeherderautoland@6f1b37c88772 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersthomasmo
bugs1562453
milestone69.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 1562453 - Remove uint32 clamping tests, which have no effect r=thomasmo There were a couple of checks to clamp arguments in VRServiceTest.cpp. The final landed patch reduced the arguments to 32-bit unsigned integers, making these checks redundant. Differential Revision: https://phabricator.services.mozilla.com/D36646
dom/vr/VRServiceTest.cpp
--- a/dom/vr/VRServiceTest.cpp
+++ b/dom/vr/VRServiceTest.cpp
@@ -626,29 +626,21 @@ void VRServiceTest::ClearController(uint
   MOZ_ASSERT(aControllerIdx < kVRControllerMaxCount);
   mPendingState.controllerState[aControllerIdx].Clear();
   mEncodedState.controllerState[aControllerIdx].Clear();
   AddCommand((uint64_t)VRPuppet_Command::VRPuppet_ClearController |
              (uint64_t)aControllerIdx);
 }
 
 void VRServiceTest::Timeout(uint32_t aDuration) {
-  // Clamp to 32-bit unsigned value
-  if (aDuration > 0xffffffff) {
-    aDuration = 0xffffffff;
-  }
   AddCommand((uint64_t)VRPuppet_Command::VRPuppet_Timeout |
              (uint64_t)aDuration);
 }
 
 void VRServiceTest::Wait(uint32_t aDuration) {
-  // Clamp to 32-bit unsigned value
-  if (aDuration > 0xffffffff) {
-    aDuration = 0xffffffff;
-  }
   AddCommand((uint64_t)VRPuppet_Command::VRPuppet_Wait | (uint64_t)aDuration);
 }
 
 void VRServiceTest::WaitHapticIntensity(uint32_t aControllerIdx,
                                         uint32_t aHapticIdx, double aIntensity,
                                         ErrorResult& aRv) {
   if (aControllerIdx >= kVRControllerMaxCount) {
     aRv.Throw(NS_ERROR_INVALID_ARG);