diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /dom/events/DataTransferItem.cpp | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/DataTransferItem.cpp')
-rw-r--r-- | dom/events/DataTransferItem.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dom/events/DataTransferItem.cpp b/dom/events/DataTransferItem.cpp index 8b1aa1902c..27bce8bd8b 100644 --- a/dom/events/DataTransferItem.cpp +++ b/dom/events/DataTransferItem.cpp @@ -76,6 +76,7 @@ already_AddRefed<DataTransferItem> DataTransferItem::Clone( it->mData = mData; it->mPrincipal = mPrincipal; it->mChromeOnly = mChromeOnly; + it->mDoNotAttemptToLoadData = mDoNotAttemptToLoadData; return it.forget(); } @@ -144,7 +145,7 @@ void DataTransferItem::SetData(nsIVariant* aData) { } void DataTransferItem::FillInExternalData() { - if (mData) { + if (mData || mDoNotAttemptToLoadData) { return; } @@ -183,6 +184,11 @@ void DataTransferItem::FillInExternalData() { nsresult rv = clipboard->GetData(trans, mDataTransfer->ClipboardType(), windowContext); if (NS_WARN_IF(NS_FAILED(rv))) { + if (rv == NS_ERROR_CONTENT_BLOCKED) { + // If the load of this content was blocked by Content Analysis, + // do not attempt to load it again. + mDoNotAttemptToLoadData = true; + } return; } } else { |