Index: Source/core/platform/chromium/ChromiumDataObject.cpp |
diff --git a/Source/core/platform/chromium/ChromiumDataObject.cpp b/Source/core/platform/chromium/ChromiumDataObject.cpp |
index 2c7fa1601a4f2c410f521a766efa974f41a2be12..a9a536dfcfa1a57266e2e8189c64443671506560 100644 |
--- a/Source/core/platform/chromium/ChromiumDataObject.cpp |
+++ b/Source/core/platform/chromium/ChromiumDataObject.cpp |
@@ -90,18 +90,24 @@ void ChromiumDataObject::clearAll() |
m_itemList.clear(); |
} |
-void ChromiumDataObject::add(const String& data, const String& type, ExceptionState& es) |
+PassRefPtr<ChromiumDataObjectItem> ChromiumDataObject::add(const String& data, const String& type, ExceptionState& es) |
{ |
- if (!internalAddStringItem(ChromiumDataObjectItem::createFromString(type, data))) |
+ RefPtr<ChromiumDataObjectItem> item = ChromiumDataObjectItem::createFromString(type, data); |
+ if (!internalAddStringItem(item)) { |
es.throwDOMException(NotSupportedError); |
+ return 0; |
+ } |
+ return item; |
} |
-void ChromiumDataObject::add(PassRefPtr<File> file, ScriptExecutionContext* context) |
+PassRefPtr<ChromiumDataObjectItem> ChromiumDataObject::add(PassRefPtr<File> file, ScriptExecutionContext* context) |
{ |
if (!file) |
- return; |
+ return 0; |
- m_itemList.append(ChromiumDataObjectItem::createFromFile(file)); |
+ RefPtr<ChromiumDataObjectItem> item = ChromiumDataObjectItem::createFromFile(file); |
+ m_itemList.append(item); |
+ return item; |
} |
void ChromiumDataObject::clearData(const String& type) |