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 421007 cfdc0001c91b96a488d9cd6b54ee28dfcf870347
parent 421006 c3afc68aab2c175165f73ded98a4d2a34decbabe
child 421008 4231bd54fb2feca2d479876db705acc3262bea58
push id34088
push userdluca@mozilla.com
push dateMon, 04 Jun 2018 17:56:32 +0000
treeherdermozilla-central@5b15326286d4 [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