Bug 1755481: rename nsIClipboard::getData to nsIClipboard::getSomeData and document it. r=mccr8

Before, it was confusing. One could have assumed that the method gets
the data for all flavors.

Differential Revision: https://phabricator.services.mozilla.com/D138776
This commit is contained in:
Mirko Brodesser
2022-02-16 09:03:00 +00:00
parent dd7b04aa59
commit af3e92b960
12 changed files with 33 additions and 28 deletions

View File

@@ -206,9 +206,9 @@ nsresult TextEditor::PasteAsAction(int32_t aClipboardType,
return NS_OK; // XXX Why?
}
// Get the Data from the clipboard.
rv = clipboard->GetData(transferable, aClipboardType);
rv = clipboard->GetSomeData(transferable, aClipboardType);
if (NS_FAILED(rv)) {
NS_WARNING("nsIClipboard::GetData() failed, but ignored");
NS_WARNING("nsIClipboard::GetSomeData() failed, but ignored");
return NS_OK; // XXX Why?
}
// XXX Why don't we check this first?