Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/devtools/client/debugger/src/client/firefox-js.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/devtools/client/debugger/src/client/firefox.js b/devtools/client/debugger/src/client/firefox.js
index 9a269e6e87a631cad95f89b9cd679a5cf5552879..0d1c56d12875c2307c9003aebf084d2803e8fcdd 100644
--- a/devtools/client/debugger/src/client/firefox.js
+++ b/devtools/client/debugger/src/client/firefox.js
@@ -11,9 +11,6 @@ import sourceQueue from "../utils/source-queue";
const {
TRACER_LOG_METHODS,
} = require("resource://devtools/shared/specs/tracer.js");
-const { AppConstants } = ChromeUtils.importESModule(
- "resource://gre/modules/AppConstants.sys.mjs"
-);
const { PrefObserver } = require("resource://devtools/client/shared/prefs.js");
const DEVTOOLS_STYLESHEETS_IN_DEBUGGER =
"devtools.debugger.features.stylesheets-in-debugger";
@@ -116,7 +113,7 @@ export async function onConnect(_commands, _resourceCommand, _actions, store) {
commands.tracerCommand.on("toggle", onTracingToggled);

if (!commands.client.isLocalClient) {
- const localPlatformVersion = AppConstants.MOZ_APP_VERSION;
+ const localPlatformVersion = Services.appinfo.platformVersion;
const remotePlatformVersion = await getRemotePlatformVersion();
actions.setLocalAndRemoteRuntimeVersion(
localPlatformVersion,
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/devtools/client/shared/remote-debugging/version-checker.js b/devtools/client/shared/remote-debugging/version-checker.js
index 8437408641a8db985d343b33314feffbec75888b..efa12f43ab5ae32eac3583c6315341c85f016ec2 100644
--- a/devtools/client/shared/remote-debugging/version-checker.js
+++ b/devtools/client/shared/remote-debugging/version-checker.js
@@ -4,10 +4,6 @@

"use strict";

-const { AppConstants } = ChromeUtils.importESModule(
- "resource://gre/modules/AppConstants.sys.mjs"
-);
-
const MS_PER_DAY = 1000 * 60 * 60 * 24;

const COMPATIBILITY_STATUS = {
@@ -83,7 +79,7 @@ function computeMinMaxVersion(localVersion) {
async function checkVersionCompatibility(devToolsClient) {
const localDescription = {
appbuildid: Services.appinfo.appBuildID,
- platformversion: AppConstants.MOZ_APP_VERSION,
+ platformversion: Services.appinfo.platformVersion,
};

try {
7 changes: 7 additions & 0 deletions src/zen/tests/devtools/browser.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

[DEFAULT]

["browser_remote_debugging_version_check.js"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* Any copyright is dedicated to the Public Domain.
https://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

const { require } = ChromeUtils.importESModule(
"resource://devtools/shared/loader/Loader.sys.mjs"
);
const {
DevToolsClient,
} = require("resource://devtools/client/devtools-client.js");
const {
DevToolsServer,
} = require("resource://devtools/server/devtools-server.js");
const {
checkVersionCompatibility,
COMPATIBILITY_STATUS,
} = require("resource://devtools/client/shared/remote-debugging/version-checker.js");

add_task(async function test_this_zen_runtime_is_compatible() {
DevToolsServer.init();
DevToolsServer.registerAllActors();
DevToolsServer.allowChromeProcess = true;

const client = new DevToolsClient(DevToolsServer.connectPipe());
await client.connect();
registerCleanupFunction(async () => {
await client.close();
DevToolsServer.destroy();
DevToolsServer.allowChromeProcess = false;
});

const report = await checkVersionCompatibility(client);
is(
report.localVersion,
Services.appinfo.platformVersion,
"Local version is the platform version"
);
is(
report.status,
COMPATIBILITY_STATUS.COMPATIBLE,
"This Zen is reported as compatible with itself"
);
});
1 change: 1 addition & 0 deletions src/zen/tests/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ BROWSER_CHROME_MANIFESTS += [
"compact_mode/browser.toml",
"container_essentials/browser.toml",
"device_sync/browser.toml",
"devtools/browser.toml",
"folders/browser.toml",
"glance/browser.toml",
"kbs/browser.toml",
Expand Down