summaryrefslogtreecommitdiffstats
path: root/devtools/client/performance-new/shared
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/client/performance-new/shared
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/performance-new/shared')
-rw-r--r--devtools/client/performance-new/shared/background.sys.mjs18
-rw-r--r--devtools/client/performance-new/shared/browser.js6
2 files changed, 21 insertions, 3 deletions
diff --git a/devtools/client/performance-new/shared/background.sys.mjs b/devtools/client/performance-new/shared/background.sys.mjs
index f538500a42..4b19f68b71 100644
--- a/devtools/client/performance-new/shared/background.sys.mjs
+++ b/devtools/client/performance-new/shared/background.sys.mjs
@@ -63,7 +63,7 @@ const PREF_PREFIX = "devtools.performance.recording.";
// capabilities of the WebChannel. The front-end can handle old WebChannel
// versions and has a full list of versions and capabilities here:
// https://github.com/firefox-devtools/profiler/blob/main/src/app-logic/web-channel.js
-const CURRENT_WEBCHANNEL_VERSION = 2;
+const CURRENT_WEBCHANNEL_VERSION = 3;
const lazyRequire = {};
// eslint-disable-next-line mozilla/lazy-getter-object-name
@@ -761,7 +761,7 @@ async function getResponseForMessage(request, browser) {
// Enable the profiler menu button.
const { ProfilerMenuButton } = lazy.ProfilerMenuButton();
- ProfilerMenuButton.addToNavbar(ownerDocument);
+ ProfilerMenuButton.addToNavbar();
// Dispatch the change event manually, so that the shortcuts will also be
// added.
@@ -817,6 +817,20 @@ async function getResponseForMessage(request, browser) {
}
return [];
}
+ case "GET_EXTERNAL_MARKERS": {
+ const { startTime, endTime } = request;
+ const externalMarkersUrl = Services.prefs.getCharPref(
+ "devtools.performance.recording.markers.external-url",
+ ""
+ );
+ if (externalMarkersUrl) {
+ const response = await fetch(
+ `${externalMarkersUrl}?start=${startTime}&end=${endTime}`
+ );
+ return response.json();
+ }
+ return [];
+ }
default:
console.error(
"An unknown message type was received by the profiler's WebChannel handler.",
diff --git a/devtools/client/performance-new/shared/browser.js b/devtools/client/performance-new/shared/browser.js
index c97bb0a0ab..34f641cc1b 100644
--- a/devtools/client/performance-new/shared/browser.js
+++ b/devtools/client/performance-new/shared/browser.js
@@ -153,7 +153,11 @@ function openFilePickerForObjdir(window, objdirs, changeObjdirs) {
const FilePicker = Cc["@mozilla.org/filepicker;1"].createInstance(
Ci.nsIFilePicker
);
- FilePicker.init(window, "Pick build directory", FilePicker.modeGetFolder);
+ FilePicker.init(
+ window.browsingContext,
+ "Pick build directory",
+ FilePicker.modeGetFolder
+ );
FilePicker.open(rv => {
if (rv == FilePicker.returnOK) {
const path = FilePicker.file.path;