Closed Bug 1464211 Opened 2 years ago Closed 2 years ago

In DataTransferItemList::Remove(..) do not throw an error if deleting nonexistent item

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: annyG, Assigned: annyG)

Details

Attachments

(1 file)

The specification does not indicate if an exception should be thrown if an attempt is made to delete a nonexistent item, so therefore we should not throw it.
Assignee: nobody → agakhokidze
Priority: -- → P2
Comment on attachment 8980598 [details]
Bug 1464211 - In DataTransferItemList::Remove do not throw an error if deleting nonexistent item,

https://reviewboard.mozilla.org/r/246766/#review253360

::: commit-message-c4a61:3
(Diff revision 1)
> +Bug 1464211 - Part 1: In DataTransferItemList::Remove do not throw an error if deleting nonexistent item, r=nika
> +
> +MozReview-Commit-ID: 8HriMr6poTY

please add reference to the spec here

::: dom/events/DataTransferItemList.cpp:94
(Diff revision 1)
>    if (mDataTransfer->IsReadOnly()) {
>      aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
>      return;
>    }
>  
> -  if (aIndex >= Length()) {
> + if (aIndex >= Length()) {

nit: indentation
Attachment #8980598 - Flags: review?(nika) → review+
Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cfdc0001c91b
In DataTransferItemList::Remove do not throw an error if deleting nonexistent item, r=Nika
https://hg.mozilla.org/mozilla-central/rev/cfdc0001c91b
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.