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

RESOLVED FIXED in Firefox 62

Status

()

enhancement
P2
normal
RESOLVED FIXED
a year ago
2 months ago

People

(Reporter: annyG, Assigned: annyG)

Tracking

unspecified
mozilla62
Points:
---

Firefox Tracking Flags

(firefox62 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

a year 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

a year ago
Assignee: nobody → agakhokidze
Priority: -- → P2

Comment 2

a year 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

a year 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

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cfdc0001c91b
Status: NEW → RESOLVED
Last Resolved: a year ago
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.