tor-browser

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

commit 895057d7354258d872332bd79f497917b2810b91
parent 3ba5316e145a67fd39429c13e6bd53053a599755
Author: Cristina Horotan <chorotan@mozilla.com>
Date:   Fri, 12 Dec 2025 20:39:23 +0200

Revert "Bug 2005456 - Move the dependency on MOZ_SOURCE_STAMP from WebRenderAPI.cpp to XREAppData.cpp r=glandium" for causing bcv failures

This reverts commit 77075ac3b00b39a33da68c8cdd06b4e77f5abb9a.

Diffstat:
Mbuild/appini_header.py | 6+-----
Mbuild/variables.py | 3+++
Mgfx/webrender_bindings/WebRenderAPI.cpp | 15+++++++++------
Mxpcom/build/XREAppData.h | 6------
Mxpcom/glue/XREAppData.cpp | 1-
5 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/build/appini_header.py b/build/appini_header.py @@ -57,9 +57,6 @@ def main(output, file): else: appdata["App:sourceurl"] = "NULL" - if "App:sourcestamp" not in appdata: - appdata["App:sourcestamp"] = "NULL" - if "AppUpdate:url" not in appdata: appdata["AppUpdate:url"] = "" @@ -80,8 +77,7 @@ def main(output, file): %(App:profile)s, NULL, // UAName %(App:sourceurl)s, - "%(AppUpdate:url)s", - %(App:sourcestamp)s + "%(AppUpdate:url)s" };""" % appdata ) diff --git a/build/variables.py b/build/variables.py @@ -100,6 +100,9 @@ def source_repo_header(output): "could not resolve changeset; " "try setting MOZ_SOURCE_CHANGESET" ) + if changeset: + output.write("#define MOZ_SOURCE_STAMP %s\n" % changeset) + if repo and buildconfig.substs.get("MOZ_INCLUDE_SOURCE_INFO"): source = "%s/rev/%s" % (repo, changeset) output.write("#define MOZ_SOURCE_REPO %s\n" % repo) diff --git a/gfx/webrender_bindings/WebRenderAPI.cpp b/gfx/webrender_bindings/WebRenderAPI.cpp @@ -11,13 +11,13 @@ #include "mozilla/webrender/RendererOGL.h" #include "mozilla/gfx/gfxVars.h" #include "mozilla/layers/CompositorThread.h" +#include "mozilla/HelperMacros.h" #include "mozilla/StaticPrefs_gfx.h" #include "mozilla/StaticPrefs_webgl.h" #include "mozilla/ToString.h" #include "mozilla/webrender/RenderCompositor.h" #include "mozilla/widget/CompositorWidget.h" #include "mozilla/layers/SynchronousTask.h" -#include "mozilla/XREAppData.h" #include "nsDisplayList.h" #include "nsThreadUtils.h" #include "TextDrawTarget.h" @@ -26,14 +26,17 @@ #include "source-repo.h" +#ifdef MOZ_SOURCE_STAMP +# define MOZ_SOURCE_STAMP_VALUE MOZ_STRINGIFY(MOZ_SOURCE_STAMP) +#else +# define MOZ_SOURCE_STAMP_VALUE nullptr +#endif + static mozilla::LazyLogModule sWrDLLog("wr.dl"); #define WRDL_LOG(...) \ MOZ_LOG(sWrDLLog, LogLevel::Debug, ("WRDL(%p): " __VA_ARGS__)) -extern const mozilla::XREAppData* gAppData; - namespace mozilla { - using namespace layers; namespace wr { @@ -904,7 +907,7 @@ void WebRenderAPI::Capture() { // SCENE | FRAME | TILE_CACHE uint8_t bits = 15; // TODO: get from JavaScript const char* path = "wr-capture"; // TODO: get from JavaScript - const char* revision = gAppData->sourceStamp; + const char* revision = MOZ_SOURCE_STAMP_VALUE; wr_api_capture(mDocHandle, path, revision, bits); } @@ -915,7 +918,7 @@ void WebRenderAPI::StartCaptureSequence(const nsACString& aPath, } wr_api_start_capture_sequence(mDocHandle, PromiseFlatCString(aPath).get(), - gAppData->sourceStamp, aFlags); + MOZ_SOURCE_STAMP_VALUE, aFlags); mCaptureSequence = true; } diff --git a/xpcom/build/XREAppData.h b/xpcom/build/XREAppData.h @@ -178,11 +178,6 @@ class XREAppData { */ CharPtr updateURL; - /** - * The changeset to the source revision for this build of the application. - */ - CharPtr sourceStamp; - #if defined(XP_WIN) && defined(MOZ_SANDBOX) /** * Chromium sandbox BrokerServices. @@ -230,7 +225,6 @@ struct StaticXREAppData { const char* UAName; const char* sourceURL; const char* updateURL; - const char* sourceStamp; }; } // namespace mozilla diff --git a/xpcom/glue/XREAppData.cpp b/xpcom/glue/XREAppData.cpp @@ -25,7 +25,6 @@ XREAppData& XREAppData::operator=(const StaticXREAppData& aOther) { UAName = aOther.UAName; sourceURL = aOther.sourceURL; updateURL = aOther.updateURL; - sourceStamp = aOther.sourceStamp; return *this; }