Commit 57aedd56 authored by coderus's avatar coderus

fix. Truncate mBuffer after use.

parent 3a2b1642
......@@ -105,8 +105,6 @@ nsEmbedClipboard::GetData(nsITransferable* aTransferable, int32_t aWhichClipboar
rv = dataWrapper->SetData(mBuffer);
NS_ENSURE_SUCCESS(rv, rv);
mBuffer.Truncate();
// If our data flavor has already been added, this will fail. But we don't care
aTransferable->AddDataFlavor(kUnicodeMime);
......@@ -115,6 +113,8 @@ nsEmbedClipboard::GetData(nsITransferable* aTransferable, int32_t aWhichClipboar
rv = aTransferable->SetTransferData(kUnicodeMime, nsisupportsDataWrapper,
mBuffer.Length() * sizeof(PRUnichar));
NS_ENSURE_SUCCESS(rv, rv);
mBuffer.Truncate();
}
return NS_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment