mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1902305 - Check if clipboard type is supported in nsBaseClipboard::HasDataMatchingFlavors
; r=tschuster
Differential Revision: https://phabricator.services.mozilla.com/D213766
This commit is contained in:
parent
9fc3caae0d
commit
4f7cb2c845
@ -777,6 +777,13 @@ nsBaseClipboard::HasDataMatchingFlavors(const nsTArray<nsCString>& aFlavorList,
|
||||
int32_t aWhichClipboard,
|
||||
bool* aOutResult) {
|
||||
MOZ_CLIPBOARD_LOG("%s: clipboard=%d", __FUNCTION__, aWhichClipboard);
|
||||
|
||||
if (!nsIClipboard::IsClipboardTypeSupported(aWhichClipboard)) {
|
||||
MOZ_CLIPBOARD_LOG("%s: clipboard %d is not supported.", __FUNCTION__,
|
||||
aWhichClipboard);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (MOZ_CLIPBOARD_LOG_ENABLED()) {
|
||||
MOZ_CLIPBOARD_LOG(" Asking for content clipboard=%i:\n",
|
||||
aWhichClipboard);
|
||||
|
Loading…
Reference in New Issue
Block a user