tor-browser

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

commit 8762d77351c0c5378d5a41ed8fa938348e5976af
parent b406c68668db2ac7c8a01b3d4a9caef25395e12a
Author: Josh Aas <jaas@kflag.net>
Date:   Wed, 29 Oct 2025 20:27:39 +0000

Bug 1997086 - clean up comments in macOS and unix file code. r=mccr8

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

Diffstat:
Mxpcom/io/nsILocalFileMac.idl | 9+--------
Mxpcom/io/nsLocalFileUnix.cpp | 15+++------------
2 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/xpcom/io/nsILocalFileMac.idl b/xpcom/io/nsILocalFileMac.idl @@ -24,7 +24,6 @@ interface nsILocalFileMac : nsIFile * * Init this object with a CFURLRef * - * NOTE: Supported only for XP_MACOSX * NOTE: If the path of the CFURL is /a/b/c, at least a/b must exist beforehand. * * @param aCFURL the CoreFoundation URL @@ -37,8 +36,6 @@ interface nsILocalFileMac : nsIFile * * Init this object with an FSRef * - * NOTE: Supported only for XP_MACOSX - * * @param aFSRef the native FSRef * */ @@ -55,8 +52,6 @@ interface nsILocalFileMac : nsIFile * the target of the alias. If followLinks is FALSE, returns * the unresolved alias file. * - * NOTE: Supported only for XP_MACOSX - * * @return * */ @@ -72,8 +67,6 @@ interface nsILocalFileMac : nsIFile * the target of the alias. If followLinks is FALSE, returns * the unresolved alias file. * - * NOTE: Supported only for XP_MACOSX - * * @return * */ @@ -102,7 +95,7 @@ interface nsILocalFileMac : nsIFile /** * isPackage * - * returns true if a directory is determined to be a package under Mac OS 9/X + * returns true if a directory is determined to be a package * */ boolean isPackage(); diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp @@ -412,7 +412,7 @@ nsLocalFile::CreateAllAncestors(uint32_t aPermissions) { break; } - /* Temporarily NUL-terminate here */ + /* Temporarily NULL-terminate here */ *slashp = '\0'; #ifdef DEBUG_NSIFILE fprintf(stderr, "nsIFile: mkdir(\"%s\")\n", buffer); @@ -863,7 +863,6 @@ nsresult nsLocalFile::GetNativeTargetPathName(nsIFile* aNewParent, } if (!targetExists) { - // XXX create the new directory with some permissions rv = aNewParent->Create(DIRECTORY_TYPE, 0755); if (NS_FAILED(rv)) { return rv; @@ -899,11 +898,8 @@ nsresult nsLocalFile::GetNativeTargetPathName(nsIFile* aNewParent, nsresult nsLocalFile::CopyDirectoryTo(nsIFile* aNewParent) { nsresult rv; - /* - * dirCheck is used for various boolean test results such as from Equals, - * Exists, isDir, etc. - */ - bool dirCheck, isSymlink; + bool dirCheck; // Used for various tests like Equals, Exists, isDir, etc. + bool isSymlink; uint32_t oldPerms; if (NS_FAILED(rv = IsDirectory(&dirCheck))) { @@ -1845,7 +1841,6 @@ nsLocalFile::GetParent(nsIFile** aParent) { return NS_OK; } - // <brendan, after jband> I promise to play nice char* buffer = mPath.BeginWriting(); // find the last significant slash in buffer char* slashp = strrchr(buffer, '/'); @@ -1878,10 +1873,6 @@ nsLocalFile::GetParent(nsIFile** aParent) { return NS_OK; } -/* - * The results of Exists, isWritable and isReadable are not cached. - */ - NS_IMETHODIMP nsLocalFile::Exists(bool* aResult) { CHECK_mPath();