diff --git a/dom/base/nsContentAreaDragDrop.cpp b/dom/base/nsContentAreaDragDrop.cpp index 722064e34e9a..7f5bbe84f794 100644 --- a/dom/base/nsContentAreaDragDrop.cpp +++ b/dom/base/nsContentAreaDragDrop.cpp @@ -230,12 +230,10 @@ CheckAndGetExtensionForMime(const nsCString& aExtension, NS_IMETHODIMP nsContentAreaDragDropDataProvider::GetFlavorData(nsITransferable *aTransferable, const char *aFlavor, - nsISupports **aData, - uint32_t *aDataLen) + nsISupports **aData) { - NS_ENSURE_ARG_POINTER(aData && aDataLen); + NS_ENSURE_ARG_POINTER(aData); *aData = nullptr; - *aDataLen = 0; nsresult rv = NS_ERROR_NOT_IMPLEMENTED; @@ -345,7 +343,6 @@ nsContentAreaDragDropDataProvider::GetFlavorData(nsITransferable *aTransferable, // send back an nsIFile if (NS_SUCCEEDED(rv)) { CallQueryInterface(file, aData); - *aDataLen = sizeof(nsIFile*); } } diff --git a/widget/nsITransferable.idl b/widget/nsITransferable.idl index 14fc96a37b58..f7521ac4b7aa 100644 --- a/widget/nsITransferable.idl +++ b/widget/nsITransferable.idl @@ -86,9 +86,8 @@ interface nsIFlavorDataProvider : nsISupports * @param aTransferable (in parameter) the transferable we're being called for. * @param aFlavor (in parameter) the flavor of data to retrieve * @param aData the data. Some variant of class in nsISupportsPrimitives.idl - * @param aDataLen the length of the data */ - void getFlavorData(in nsITransferable aTransferable, in string aFlavor, out nsISupports aData, out unsigned long aDataLen); + void getFlavorData(in nsITransferable aTransferable, in string aFlavor, out nsISupports aData); }; diff --git a/widget/nsTransferable.cpp b/widget/nsTransferable.cpp index 5d722a88b155..255484517631 100644 --- a/widget/nsTransferable.cpp +++ b/widget/nsTransferable.cpp @@ -270,9 +270,8 @@ nsTransferable::GetTransferData(const char* aFlavor, // Do we have a (lazy) data provider? if (nsCOMPtr dataProvider = do_QueryInterface(dataBytes)) { - uint32_t len; rv = dataProvider->GetFlavorData(this, aFlavor, - getter_AddRefs(dataBytes), &len); + getter_AddRefs(dataBytes)); if (NS_FAILED(rv)) { dataBytes = nullptr; // The provider failed, fall into the converter code below. @@ -298,11 +297,10 @@ nsTransferable::GetTransferData(const char* aFlavor, data.GetData(getter_AddRefs(dataBytes)); // Do we have a (lazy) data provider? - uint32_t len; if (nsCOMPtr dataProvider = do_QueryInterface(dataBytes)) { rv = dataProvider->GetFlavorData(this, aFlavor, - getter_AddRefs(dataBytes), &len); + getter_AddRefs(dataBytes)); if (NS_FAILED(rv)) { // Give up. return rv; @@ -310,7 +308,7 @@ nsTransferable::GetTransferData(const char* aFlavor, } uint32_t dataLen; - return mFormatConv->Convert(data.GetFlavor().get(), dataBytes, len, + return mFormatConv->Convert(data.GetFlavor().get(), dataBytes, 0, aFlavor, aData, &dataLen); } }