Bug 1464211 - In DataTransferItemList::Remove do not throw an error if deleting nonexistent item, r=Nika
authorAnny Gakhokidze <agakhokidze@mozilla.com>
Fri, 25 May 2018 10:43:36 -0400
changeset 420882 cfdc0001c91b96a488d9cd6b54ee28dfcf870347
parent 420881 c3afc68aab2c175165f73ded98a4d2a34decbabe
child 420883 4231bd54fb2feca2d479876db705acc3262bea58
push id64756
push usernlayzell@mozilla.com
push dateFri, 01 Jun 2018 17:19:57 +0000
treeherderautoland@cfdc0001c91b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNika
bugs1464211
milestone62.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 1464211 - In DataTransferItemList::Remove do not throw an error if deleting nonexistent item, r=Nika In the spec, https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitemlist-remove, DataTransferItemList::Remove does not specify that an error should be thrown if a nonexistent item is to be removed. MozReview-Commit-ID: 8HriMr6poTY
dom/events/DataTransferItemList.cpp
--- a/dom/events/DataTransferItemList.cpp
+++ b/dom/events/DataTransferItemList.cpp
@@ -87,17 +87,16 @@ DataTransferItemList::Remove(uint32_t aI
                              ErrorResult& aRv)
 {
   if (mDataTransfer->IsReadOnly()) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
   }
 
   if (aIndex >= Length()) {
-    aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
     return;
   }
 
   ClearDataHelper(mItems[aIndex], aIndex, -1, aSubjectPrincipal, aRv);
 }
 
 DataTransferItem*
 DataTransferItemList::IndexedGetter(uint32_t aIndex, bool& aFound) const