Address post-review feedback following r222885
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Oct 2017 08:06:16 +0000 (08:06 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Oct 2017 08:06:16 +0000 (08:06 +0000)
commit69d1ae0f9b13c25c24005b9329e1bfb1cd51ac42
treec9ef1857e381385ce6ae3b11340c768da4b74711
parentf2aa626832193376737707f87b000c7b3b198466
Address post-review feedback following r222885
https://bugs.webkit.org/show_bug.cgi?id=177853
<rdar://problem/34807346>

Reviewed by Ryosuke Niwa and Dan Bates.

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::updateFileList):
(WebCore::DataTransfer::types const):
(WebCore::DataTransfer::filesFromPasteboardAndItemList const):
* dom/DataTransferItem.h:
(WebCore::DataTransferItem::file):
(WebCore::DataTransferItem::file const): Deleted.
* dom/DataTransferItemList.cpp:
(WebCore::DataTransferItemList::add):
(WebCore::DataTransferItemList::remove):

When removing a data transfer item, capture it in a Ref for the scope of remove(), so that it won't be destroyed
immediately after removing from the item list.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/DataTransfer.cpp
Source/WebCore/dom/DataTransferItem.h
Source/WebCore/dom/DataTransferItemList.cpp