tor-browser

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

commit 699d21d560e2b89179c30d9e58d925e3f783cb63
parent 7d3fe10ccdec4ac856bb0aba27b8e8ebd86128ed
Author: Lee Salzman <lsalzman@mozilla.com>
Date:   Tue, 28 Oct 2025 19:30:17 +0000

Bug 1996944 - Remove leftover D2D JS_SetProperty call. r=chutten,toolkit-telemetry-reviewers

The leftover JS_SetProperty for D2D was accidentally setting the D3D11 version property
to a string value, when it was expected to be a number, causing downwind problems. It
needs to be removed.

This adds a test clause to verify the D3D11 version is a number.

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

Diffstat:
Mtoolkit/components/telemetry/tests/unit/TelemetryEnvironmentTesting.sys.mjs | 8++++++++
Mwidget/windows/GfxInfo.cpp | 7-------
2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/toolkit/components/telemetry/tests/unit/TelemetryEnvironmentTesting.sys.mjs b/toolkit/components/telemetry/tests/unit/TelemetryEnvironmentTesting.sys.mjs @@ -939,6 +939,14 @@ export var TelemetryEnvironmentTesting = { lazy.Assert.equal(typeof gfxData.features.gpuProcess.status, "string"); lazy.Assert.ok(!!Glean.gfxFeatures.gpuProcess.testGetValue().status); + if (gIsWindows && !!gfxData.features?.d3d11?.version) { + lazy.Assert.equal(typeof gfxData.features.d3d11.version, "number"); + lazy.Assert.equal( + gfxData.features.d3d11.version, + Glean.gfxFeatures.d3d11.testGetValue().version + ); + } + try { // If we've not got nsIGfxInfoDebug, then this will throw and stop us doing // this test. diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp @@ -1975,13 +1975,6 @@ void GfxInfo::DescribeFeatures(JSContext* aCx, JS::Handle<JSObject*> aObj) { val = JS::BooleanValue(blocklisted); JS_SetProperty(aCx, obj, "blocklisted", val); } - - { - const char* version = "1.1"; - JS::Rooted<JSString*> str(aCx, JS_NewStringCopyZ(aCx, version)); - JS::Rooted<JS::Value> val(aCx, JS::StringValue(str)); - JS_SetProperty(aCx, obj, "version", val); - } } #ifdef DEBUG