Bug 728707, check return result of getting transferable, r=smaug
authorNeil Deakin <neil@mozilla.com>
Thu, 23 Feb 2012 15:59:45 -0500
changeset 90450 6472583e552365c865037604c08fb771bfe5fbf0
parent 90449 9c3ddd19d9648efae8934a0846eb51eb2258d937
child 90451 c97dcc479c62edbc869be699879d90b10e4c5f4d
push id783
push userlsblakk@mozilla.com
push dateTue, 24 Apr 2012 17:33:42 +0000
treeherdermozilla-beta@11faed19f136 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs728707
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 728707, check return result of getting transferable, r=smaug
content/base/src/nsContentAreaDragDrop.cpp
--- a/content/base/src/nsContentAreaDragDrop.cpp
+++ b/content/base/src/nsContentAreaDragDrop.cpp
@@ -686,16 +686,17 @@ DragDataProducer::Produce(nsDOMDataTrans
     if (*aSelection) {
       rv = nsCopySupport::GetTransferableForSelection(*aSelection, doc,
                                                       getter_AddRefs(transferable));
     }
     else {
       rv = nsCopySupport::GetTransferableForNode(nodeToSerialize, doc,
                                                  getter_AddRefs(transferable));
     }
+    NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsISupportsString> data;
     PRUint32 dataSize;
     rv = transferable->GetTransferData(kHTMLMime, getter_AddRefs(data), &dataSize);
     if (NS_SUCCEEDED(rv)) {
       data->GetData(mHtmlString);
     }
     rv = transferable->GetTransferData(kHTMLContext, getter_AddRefs(data), &dataSize);