Index: Source/core/clipboard/DataTransferItemList.cpp |
diff --git a/Source/core/clipboard/DataTransferItemList.cpp b/Source/core/clipboard/DataTransferItemList.cpp |
index b88ae428f58c5235d414e656d9a699df434dcef0..5ca82e7794a4d0602ea25594506e835a8bbd1e42 100644 |
--- a/Source/core/clipboard/DataTransferItemList.cpp |
+++ b/Source/core/clipboard/DataTransferItemList.cpp |
@@ -35,9 +35,11 @@ |
namespace WebCore { |
-PassRefPtr<DataTransferItemList> DataTransferItemList::create(PassRefPtr<Clipboard> clipboard, PassRefPtr<DataObject> list) |
+DEFINE_GC_INFO(DataTransferItemList); |
+ |
+PassRefPtrWillBeRawPtr<DataTransferItemList> DataTransferItemList::create(PassRefPtrWillBeRawPtr<Clipboard> clipboard, PassRefPtrWillBeRawPtr<DataObject> list) |
{ |
- return adoptRef(new DataTransferItemList(clipboard, list)); |
+ return adoptRefWillBeNoop(new DataTransferItemList(clipboard, list)); |
} |
DataTransferItemList::~DataTransferItemList() |
@@ -51,11 +53,11 @@ size_t DataTransferItemList::length() const |
return m_dataObject->length(); |
} |
-PassRefPtr<DataTransferItem> DataTransferItemList::item(unsigned long index) |
+PassRefPtrWillBeRawPtr<DataTransferItem> DataTransferItemList::item(unsigned long index) |
{ |
if (!m_clipboard->canReadTypes()) |
return nullptr; |
- RefPtr<DataObjectItem> item = m_dataObject->item(index); |
+ RefPtrWillBeRawPtr<DataObjectItem> item = m_dataObject->item(index); |
if (!item) |
return nullptr; |
@@ -78,11 +80,11 @@ void DataTransferItemList::clear() |
m_dataObject->clearAll(); |
} |
-PassRefPtr<DataTransferItem> DataTransferItemList::add(const String& data, const String& type, ExceptionState& exceptionState) |
+PassRefPtrWillBeRawPtr<DataTransferItem> DataTransferItemList::add(const String& data, const String& type, ExceptionState& exceptionState) |
{ |
if (!m_clipboard->canWriteData()) |
return nullptr; |
- RefPtr<DataObjectItem> item = m_dataObject->add(data, type); |
+ RefPtrWillBeRawPtr<DataObjectItem> item = m_dataObject->add(data, type); |
if (!item) { |
exceptionState.throwDOMException(NotSupportedError, "An item already exists for type '" + type + "'."); |
return nullptr; |
@@ -90,21 +92,27 @@ PassRefPtr<DataTransferItem> DataTransferItemList::add(const String& data, const |
return DataTransferItem::create(m_clipboard, item); |
} |
-PassRefPtr<DataTransferItem> DataTransferItemList::add(PassRefPtr<File> file) |
+PassRefPtrWillBeRawPtr<DataTransferItem> DataTransferItemList::add(PassRefPtr<File> file) |
{ |
if (!m_clipboard->canWriteData()) |
return nullptr; |
- RefPtr<DataObjectItem> item = m_dataObject->add(file); |
+ RefPtrWillBeRawPtr<DataObjectItem> item = m_dataObject->add(file); |
if (!item) |
return nullptr; |
return DataTransferItem::create(m_clipboard, item); |
} |
-DataTransferItemList::DataTransferItemList(PassRefPtr<Clipboard> clipboard, PassRefPtr<DataObject> dataObject) |
+DataTransferItemList::DataTransferItemList(PassRefPtrWillBeRawPtr<Clipboard> clipboard, PassRefPtrWillBeRawPtr<DataObject> dataObject) |
: m_clipboard(clipboard) |
, m_dataObject(dataObject) |
{ |
ScriptWrappable::init(this); |
} |
+void DataTransferItemList::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_clipboard); |
+ visitor->trace(m_dataObject); |
+} |
+ |
} // namespace WebCore |