Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: Source/core/clipboard/DataObjectItem.cpp

Issue 176853004: Oilpan: move core/fileapi to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/clipboard/DataObjectItem.h ('k') | Source/core/clipboard/DataTransferItem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/clipboard/DataObjectItem.cpp
diff --git a/Source/core/clipboard/DataObjectItem.cpp b/Source/core/clipboard/DataObjectItem.cpp
index 4bc529404407e9c83e633ff2ecb5a39ae3bf9395..542d0d9c8636b9b5aea82ae4f00d47f4f9253b1e 100644
--- a/Source/core/clipboard/DataObjectItem.cpp
+++ b/Source/core/clipboard/DataObjectItem.cpp
@@ -46,7 +46,7 @@ PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromString(const St
return item.release();
}
-PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromFile(PassRefPtr<File> file)
+PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromFile(PassRefPtrWillBeRawPtr<File> file)
{
RefPtrWillBeRawPtr<DataObjectItem> item = adoptRefWillBeNoop(new DataObjectItem(FileKind, file->type()));
item->m_file = file;
@@ -100,14 +100,14 @@ DataObjectItem::DataObjectItem(Kind kind, const String& type, uint64_t sequenceN
{
}
-PassRefPtr<Blob> DataObjectItem::getAsFile() const
+PassRefPtrWillBeRawPtr<Blob> DataObjectItem::getAsFile() const
{
if (kind() != FileKind)
return nullptr;
if (m_source == InternalSource) {
if (m_file)
- return m_file;
+ return m_file.get();
ASSERT(m_sharedBuffer);
// FIXME: This code is currently impossible--we never populate m_sharedBuffer when dragging
// in. At some point though, we may need to support correctly converting a shared buffer
@@ -170,5 +170,10 @@ bool DataObjectItem::isFilename() const
return m_kind == FileKind && m_file;
}
+void DataObjectItem::trace(Visitor* visitor)
+{
+ visitor->trace(m_file);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/clipboard/DataObjectItem.h ('k') | Source/core/clipboard/DataTransferItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698