summaryrefslogtreecommitdiffstats
path: root/devtools/client/performance-new/shared/background.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/performance-new/shared/background.sys.mjs')
-rw-r--r--devtools/client/performance-new/shared/background.sys.mjs18
1 files changed, 16 insertions, 2 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.",