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

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

Issue 169323002: Oilpan: Move core/clipboard/ to oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 2ba2e8cb9b4d23105d958b71b20e2b4f4f9e8027..896a70fb54b7cebb96f728b9b8e2f07a1438610f 100644
--- a/Source/core/clipboard/DataObjectItem.cpp
+++ b/Source/core/clipboard/DataObjectItem.cpp
@@ -39,49 +39,51 @@
namespace WebCore {
-PassRefPtr<DataObjectItem> DataObjectItem::createFromString(const String& type, const String& data)
+DEFINE_GC_INFO(DataObjectItem);
+
+PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromString(const String& type, const String& data)
{
- RefPtr<DataObjectItem> item = adoptRef(new DataObjectItem(StringKind, type));
+ RefPtrWillBeRawPtr<DataObjectItem> item = adoptRefWillBeNoop(new DataObjectItem(StringKind, type));
item->m_data = data;
return item.release();
}
-PassRefPtr<DataObjectItem> DataObjectItem::createFromFile(PassRefPtr<File> file)
+PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromFile(PassRefPtr<File> file)
{
- RefPtr<DataObjectItem> item = adoptRef(new DataObjectItem(FileKind, file->type()));
+ RefPtrWillBeRawPtr<DataObjectItem> item = adoptRefWillBeNoop(new DataObjectItem(FileKind, file->type()));
item->m_file = file;
return item.release();
}
-PassRefPtr<DataObjectItem> DataObjectItem::createFromURL(const String& url, const String& title)
+PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromURL(const String& url, const String& title)
{
- RefPtr<DataObjectItem> item = adoptRef(new DataObjectItem(StringKind, mimeTypeTextURIList));
+ RefPtrWillBeRawPtr<DataObjectItem> item = adoptRefWillBeNoop(new DataObjectItem(StringKind, mimeTypeTextURIList));
item->m_data = url;
item->m_title = title;
return item.release();
}
-PassRefPtr<DataObjectItem> DataObjectItem::createFromHTML(const String& html, const KURL& baseURL)
+PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromHTML(const String& html, const KURL& baseURL)
{
- RefPtr<DataObjectItem> item = adoptRef(new DataObjectItem(StringKind, mimeTypeTextHTML));
+ RefPtrWillBeRawPtr<DataObjectItem> item = adoptRefWillBeNoop(new DataObjectItem(StringKind, mimeTypeTextHTML));
item->m_data = html;
item->m_baseURL = baseURL;
return item.release();
}
-PassRefPtr<DataObjectItem> DataObjectItem::createFromSharedBuffer(const String& name, PassRefPtr<SharedBuffer> buffer)
+PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromSharedBuffer(const String& name, PassRefPtr<SharedBuffer> buffer)
{
- RefPtr<DataObjectItem> item = adoptRef(new DataObjectItem(FileKind, String()));
+ RefPtrWillBeRawPtr<DataObjectItem> item = adoptRefWillBeNoop(new DataObjectItem(FileKind, String()));
item->m_sharedBuffer = buffer;
item->m_title = name;
return item.release();
}
-PassRefPtr<DataObjectItem> DataObjectItem::createFromPasteboard(const String& type, uint64_t sequenceNumber)
+PassRefPtrWillBeRawPtr<DataObjectItem> DataObjectItem::createFromPasteboard(const String& type, uint64_t sequenceNumber)
{
if (type == mimeTypeImagePng)
- return adoptRef(new DataObjectItem(FileKind, type, sequenceNumber));
- return adoptRef(new DataObjectItem(StringKind, type, sequenceNumber));
+ return adoptRefWillBeNoop(new DataObjectItem(FileKind, type, sequenceNumber));
+ return adoptRefWillBeNoop(new DataObjectItem(StringKind, type, sequenceNumber));
}
DataObjectItem::DataObjectItem(Kind kind, const String& type)
« 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