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 /toolkit/components/windowwatcher | |
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 'toolkit/components/windowwatcher')
-rw-r--r-- | toolkit/components/windowwatcher/nsIOpenWindowInfo.idl | 6 | ||||
-rw-r--r-- | toolkit/components/windowwatcher/nsOpenWindowInfo.cpp | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl b/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl index a8347c5a1a..c0edb18536 100644 --- a/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl +++ b/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl @@ -74,4 +74,10 @@ interface nsIOpenWindowInfo : nsISupports { /* Callback to invoke when the browsing context for a new window is ready. */ [notxpcom, nostdcall] nsIBrowsingContextReadyCallback browsingContextReadyCallback(); + + /** + * When creating a window fails, we will be called to notify an error via + * callback. If no callback, do nothing. + */ + void cancel(); }; diff --git a/toolkit/components/windowwatcher/nsOpenWindowInfo.cpp b/toolkit/components/windowwatcher/nsOpenWindowInfo.cpp index 4374090075..042ee45f4e 100644 --- a/toolkit/components/windowwatcher/nsOpenWindowInfo.cpp +++ b/toolkit/components/windowwatcher/nsOpenWindowInfo.cpp @@ -57,6 +57,14 @@ nsOpenWindowInfo::BrowsingContextReadyCallback() { return mBrowsingContextReadyCallback; } +NS_IMETHODIMP nsOpenWindowInfo::Cancel() { + if (mBrowsingContextReadyCallback) { + mBrowsingContextReadyCallback->BrowsingContextReady(nullptr); + mBrowsingContextReadyCallback = nullptr; + } + return NS_OK; +} + NS_IMPL_ISUPPORTS(nsBrowsingContextReadyCallback, nsIBrowsingContextReadyCallback) |