tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 4ee598f52d08ca68720cd8a00b4f56b20ccbfa33
parent 87e88b0e3a86ad1c258bfc99aeb231bfa76d11da
Author: Andrew McCreight <continuation@gmail.com>
Date:   Mon,  6 Oct 2025 21:37:09 +0000

Bug 1992523 - Disable the warning in nsSelectionCommand::GetDocumentViewerEditFromContext. r=emilio

This warning is extremely frequent on MacOS.

Differential Revision: https://phabricator.services.mozilla.com/D267678

Diffstat:
Mdom/base/nsGlobalWindowCommands.cpp | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dom/base/nsGlobalWindowCommands.cpp b/dom/base/nsGlobalWindowCommands.cpp @@ -520,7 +520,9 @@ nsresult nsSelectionCommand::DoCommand(const nsACString& aCommandName, already_AddRefed<nsIDocumentViewerEdit> nsSelectionCommand::GetDocumentViewerEditFromContext(nsISupports* aContext) { nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryInterface(aContext); - NS_ENSURE_TRUE(window, nullptr); + if (!window) { + return nullptr; + } nsIDocShell* docShell = window->GetDocShell(); NS_ENSURE_TRUE(docShell, nullptr);