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

RESOLVED FIXED in Firefox 62

Status

()

P2
normal
RESOLVED FIXED
10 months ago
7 days ago

People

(Reporter: annyG, Assigned: annyG)

Tracking

unspecified
mozilla62
Points:
---

Firefox Tracking Flags

(firefox62 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 months ago
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)

Updated

10 months ago
Assignee: nobody → agakhokidze

Updated

10 months ago
Priority: -- → P2

Comment 2

10 months ago
mozreview-review
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+
Comment hidden (mozreview-request)

Comment 4

10 months ago
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

Comment 5

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cfdc0001c91b
Status: NEW → RESOLVED
Last Resolved: 10 months ago
status-firefox62: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.