tor-browser

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

commit 2f8f70d930c5d774ae46c062f3e2eaef8ceee882
parent e45db919f3ce87bcb51fe0ed2db3f408d4327233
Author: agoloman <agoloman@mozilla.com>
Date:   Tue, 16 Dec 2025 20:50:39 +0200

Revert "Bug 2003230 - optimize chunk_by_runtime.get_manifest for the Linux case r=jcristau" for causing linting failures.

This reverts commit 60d9b065fa0f4a5e94ff56236c837388c9d2fd8d.

Diffstat:
Mtesting/mozbase/manifestparser/manifestparser/filters.py | 37++++++++++++-------------------------
Mtesting/mozbase/manifestparser/manifestparser/util.py | 4----
2 files changed, 12 insertions(+), 29 deletions(-)

diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py @@ -16,7 +16,7 @@ from collections.abc import MutableSequence from .expression import ParseError, parse from .logger import Logger -from .util import normsep, norm_needed +from .util import normsep # built-in filters @@ -333,30 +333,17 @@ class chunk_by_runtime(InstanceFilter): self.runtimes = {normsep(m): r for m, r in runtimes.items()} self.logger = Logger() - # NOTE: get_manifest is called a lot, so we 'inline' normsep when it's - # profitable. - if norm_needed: - - @staticmethod - def get_manifest(test): - manifest = normsep(test.get("ancestor_manifest", "")) - - # Ignore ancestor_manifests that live at the root (e.g, don't have a - # path separator). The only time this should happen is when they are - # generated by the build system and we shouldn't count generated - # manifests for chunking purposes. - if not manifest or "/" not in manifest: - manifest = normsep(test["manifest_relpath"]) - return manifest - - else: - - @staticmethod - def get_manifest(test): - manifest = test.get("ancestor_manifest") - return ( - manifest if manifest and "/" in manifest else test["manifest_relpath"] - ) + @classmethod + def get_manifest(cls, test): + manifest = normsep(test.get("ancestor_manifest", "")) + + # Ignore ancestor_manifests that live at the root (e.g, don't have a + # path separator). The only time this should happen is when they are + # generated by the build system and we shouldn't count generated + # manifests for chunking purposes. + if not manifest or "/" not in manifest: + manifest = normsep(test["manifest_relpath"]) + return manifest def get_chunked_manifests(self, manifests): # Find runtimes for all relevant manifests. diff --git a/testing/mozbase/manifestparser/manifestparser/util.py b/testing/mozbase/manifestparser/manifestparser/util.py @@ -14,8 +14,6 @@ if os.altsep and os.altsep != "/": if os.sep != "/": sep_b = os.sep.encode("ascii") -norm_needed = True - if os.sep != "/": if os.altsep and os.altsep != "/": @@ -55,8 +53,6 @@ else: def normsep(path): return path - norm_needed = False - def evaluate_list_from_string(list_string): """