tor-browser

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

commit b406c68668db2ac7c8a01b3d4a9caef25395e12a
parent 285b305de4a1358d9df033f104c9cf5fe204686b
Author: Josh Aas <jaas@kflag.net>
Date:   Wed, 29 Oct 2025 20:22:22 +0000

Bug 1997179 - assert unreachability in Unix nsLocalFile::LocateNativeLeafName if no root found. r=mccr8

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

Diffstat:
Mxpcom/io/nsLocalFileUnix.cpp | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp @@ -653,8 +653,6 @@ nsLocalFile::Normalize() { void nsLocalFile::LocateNativeLeafName(nsACString::const_iterator& aBegin, nsACString::const_iterator& aEnd) { - // XXX perhaps we should cache this?? - mPath.BeginReading(aBegin); mPath.EndReading(aEnd); @@ -667,8 +665,8 @@ void nsLocalFile::LocateNativeLeafName(nsACString::const_iterator& aBegin, return; } } - // else, the entire path is the leaf name (which means this - // isn't an absolute path... unexpected??) + + MOZ_ASSERT_UNREACHABLE("nsLocalFile path should be absolute but is not!"); } NS_IMETHODIMP