From 680b9f732404beb174d3aa2d7a9fbb700bc413fb Mon Sep 17 00:00:00 2001 From: Greg Tatum Date: Wed, 27 May 2020 22:06:54 +0000 Subject: [PATCH] Bug 1633855 - Clean up some old getSupportedFeatures actor compatibility; r=julienw This is a drive-by clean-up, as I was touching this code. Differential Revision: https://phabricator.services.mozilla.com/D76510 --- devtools/client/performance-new/@types/perf.d.ts | 14 ++++---------- .../client/performance-new/components/Settings.js | 2 +- devtools/client/performance-new/store/selectors.js | 2 +- .../performance-new/gecko-profiler-interface.js | 1 - 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/devtools/client/performance-new/@types/perf.d.ts b/devtools/client/performance-new/@types/perf.d.ts index 380451b98ecc..d97be870e05b 100644 --- a/devtools/client/performance-new/@types/perf.d.ts +++ b/devtools/client/performance-new/@types/perf.d.ts @@ -60,9 +60,6 @@ export interface PerfFront { on: (type: string, listener: () => void) => void; off: (type: string, listener: () => void) => void; destroy: () => void, - /** - * This method was was added in Firefox 72. - */ getSupportedFeatures: () => MaybePromise } @@ -227,11 +224,8 @@ export interface InitializedValues { pageContext: PageContext; // The popup and devtools panel use different codepaths for getting symbol tables. getSymbolTableGetter: (profile: MinimallyTypedGeckoProfile) => GetSymbolTableCallback; - // The list of profiler features that the current target supports. Note that - // this value is only null to support older Firefox browsers that are targeted - // by the actor system. This compatibility can be required when the ESR version - // is running at least Firefox 72. - supportedFeatures: string[] | null + // The list of profiler features that the current target supports. + supportedFeatures: string[] // Allow different devtools contexts to open about:profiling with different methods. // e.g. via a new tab, or page navigation. openAboutProfiling?: () => void, @@ -288,7 +282,7 @@ export type Action = openRemoteDevTools?: () => void, recordingSettingsFromPreferences: RecordingStateFromPreferences; getSymbolTableGetter: (profile: MinimallyTypedGeckoProfile) => GetSymbolTableCallback; - supportedFeatures: string[] | null; + supportedFeatures: string[]; } | { type: "CHANGE_PRESET"; @@ -303,7 +297,7 @@ export interface InitializeStoreValues { presets: Presets; pageContext: PageContext; recordingPreferences: RecordingStateFromPreferences; - supportedFeatures: string[] | null; + supportedFeatures: string[]; getSymbolTableGetter: (profile: MinimallyTypedGeckoProfile) => GetSymbolTableCallback; openAboutProfiling?: () => void; openRemoteDevTools?: () => void; diff --git a/devtools/client/performance-new/components/Settings.js b/devtools/client/performance-new/components/Settings.js index a02e4f1dc4fe..26e855b49766 100644 --- a/devtools/client/performance-new/components/Settings.js +++ b/devtools/client/performance-new/components/Settings.js @@ -11,7 +11,7 @@ * @property {string[]} threads * @property {string} threadsString * @property {string[]} objdirs - * @property {string[] | null} supportedFeatures + * @property {string[]} supportedFeatures */ /** diff --git a/devtools/client/performance-new/store/selectors.js b/devtools/client/performance-new/store/selectors.js index 6ab86991f62a..4671e3dfad81 100644 --- a/devtools/client/performance-new/store/selectors.js +++ b/devtools/client/performance-new/store/selectors.js @@ -141,7 +141,7 @@ const getPageContext = state => getInitializedValues(state).pageContext; const getSymbolTableGetter = state => getInitializedValues(state).getSymbolTableGetter; -/** @type {Selector} */ +/** @type {Selector} */ const getSupportedFeatures = state => getInitializedValues(state).supportedFeatures; diff --git a/devtools/shared/performance-new/gecko-profiler-interface.js b/devtools/shared/performance-new/gecko-profiler-interface.js index 8e605431f9f1..cee9e3ba1fb4 100644 --- a/devtools/shared/performance-new/gecko-profiler-interface.js +++ b/devtools/shared/performance-new/gecko-profiler-interface.js @@ -235,7 +235,6 @@ class ActorReadyGeckoProfilerInterface { /** * Lists the supported features of the profiler for the current browser. - * This method was added in Firefox 72. * @returns {string[]} */ getSupportedFeatures() {