tor-browser

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

commit e7114bcf28158b46e516178c06201e4849201eba
parent 182356860cd99bd784cf36a72e2063007c3253c8
Author: Yannis Juglaret <yjuglaret@mozilla.com>
Date:   Thu, 11 Dec 2025 17:24:24 +0000

Bug 2005503 - Fix srcsrv mapping in PDB files. r=mstange

This patch fixes a mismatch caused by some part of the code still
referencing the previous Firefox repository when the other part was now
referencing the new one. We define and rely on constants to avoid such
occurrences in the future.

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

Diffstat:
Mtoolkit/crashreporter/tools/symbolstore.py | 17+++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py @@ -46,6 +46,11 @@ from mozpack.copier import FileRegistry from mozpack.manifests import InstallManifest, UnreadableInstallManifest from variables import get_buildid +# Global variables + +RUST_GITHUB = "github.com/rust-lang/rust" +FIREFOX_GITHUB = "github.com/mozilla-firefox/firefox" + # Utility classes @@ -327,7 +332,7 @@ def TryGetGitRepoInfoFromHg(srcdir): "hg", "-R", srcdir, "log", "-r", rev, "-T", "{extras.git_commit}" ) if git_commit: - git_root = "https://github.com/mozilla-firefox/firefox" + git_root = f"https://{FIREFOX_GITHUB}" return GitRepoInfo(srcdir, git_commit, git_root) return None @@ -449,8 +454,8 @@ def SourceIndex(fileStream, outputPath, vcs_root, s3_bucket): + "VERCTRL=http\r\n" + "SRCSRV: variables ------------------------------------------\r\n" + "SRCSRVVERCTRL=http\r\n" - + "RUST_GITHUB_TARGET=https://github.com/rust-lang/rust/raw/%var4%/%var3%\r\n" - + "FIREFOX_GITHUB_TARGET=https://github.com/mozilla/firefox/raw/%var4%/%var3%\r\n" + + f"RUST_GITHUB_TARGET=https://{RUST_GITHUB}/raw/%var4%/%var3%\r\n" + + f"FIREFOX_GITHUB_TARGET=https://{FIREFOX_GITHUB}/raw/%var4%/%var3%\r\n" ) pdbStreamFile.write("HGSERVER=" + vcs_root + "\r\n") pdbStreamFile.write("HG_TARGET=%hgserver%/raw-file/%var4%/%var3%\r\n") @@ -529,7 +534,7 @@ class Dumper: rust_srcdir = "/rustc/" + rust_sha self.srcdirs.append(rust_srcdir) Dumper.srcdirRepoInfo[rust_srcdir] = GitRepoInfo( - rust_srcdir, rust_sha, "https://github.com/rust-lang/rust/" + rust_srcdir, rust_sha, f"https://{RUST_GITHUB}/" ) # subclasses override this @@ -708,11 +713,11 @@ class Dumper: (vcs, bucket, source_file, nothing) = filename.split(":", 3) sourceFileStream += sourcepath + "*S3_TARGET*" sourceFileStream += source_file + "\r\n" - elif filename.startswith("git:github.com/rust-lang/rust:"): + elif filename.startswith(f"git:{RUST_GITHUB}:"): (vcs, repo, source_file, revision) = filename.split(":", 3) sourceFileStream += sourcepath + "*RUST_GITHUB_TARGET*" sourceFileStream += source_file + "*" + revision + "\r\n" - elif filename.startswith("git:github.com/mozilla/firefox:"): + elif filename.startswith(f"git:{FIREFOX_GITHUB}:"): (vcs, repo, source_file, revision) = filename.split(":", 3) sourceFileStream += sourcepath + "*FIREFOX_GITHUB_TARGET*" sourceFileStream += source_file + "*" + revision + "\r\n"