From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- dom/events/Clipboard.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dom/events/Clipboard.cpp') diff --git a/dom/events/Clipboard.cpp b/dom/events/Clipboard.cpp index b163bc816f..b797f93961 100644 --- a/dom/events/Clipboard.cpp +++ b/dom/events/Clipboard.cpp @@ -132,6 +132,11 @@ class ClipboardGetCallbackForRead final : public ClipboardGetCallback { } RefPtr p(std::move(mPromise)); + if (entries.IsEmpty()) { + p->MaybeResolve(nsTArray>{}); + return NS_OK; + } + // We currently only support one clipboard item. p->MaybeResolve( AutoTArray, 1>{MakeRefPtr( -- cgit v1.2.3