forked from mirrors/gecko-dev
Bug 1740438 - [devtools] Remove backward compatibility code for recordAllocations target configuration option r=devtools-reviewers,bomsy
Depends on D130847 Differential Revision: https://phabricator.services.mozilla.com/D130848
This commit is contained in:
parent
474ba47047
commit
d226afc848
2 changed files with 6 additions and 8 deletions
|
|
@ -12,12 +12,8 @@ exports.toggleRecordingAllocationStacks = function(commands) {
|
|||
return async function({ dispatch, getState }) {
|
||||
dispatch({ type: actions.TOGGLE_RECORD_ALLOCATION_STACKS_START });
|
||||
|
||||
const { targetConfigurationCommand } = commands;
|
||||
// @backward-compat { version 94 } Starts supporting "recordAllocations" configuration in order to better support SSTS
|
||||
// Could only be dropped once we support targetConfiguration for all toolboxes (either we drop the Browser content toolbox, or support the content process in watcher actor)
|
||||
// Once Fx93 support is removed, we can replace this check with `commands.targetCommand.hasTargetWatcherSupport()` to check if the watcher is supported.
|
||||
if (targetConfigurationCommand.supports("recordAllocations")) {
|
||||
await targetConfigurationCommand.updateConfiguration({
|
||||
if (commands.targetCommand.hasTargetWatcherSupport()) {
|
||||
await commands.targetConfigurationCommand.updateConfiguration({
|
||||
recordAllocations: getState().recordingAllocationStacks
|
||||
? null
|
||||
: ALLOCATION_RECORDING_OPTIONS,
|
||||
|
|
|
|||
|
|
@ -16,10 +16,12 @@ add_task(async function() {
|
|||
await front.attach();
|
||||
// Implement the minimal mock, doing nothing to make toggleRecordingAllocationStacks pass
|
||||
const commands = {
|
||||
targetConfigurationCommand: {
|
||||
supports() {
|
||||
targetCommand: {
|
||||
hasTargetWatcherSupport() {
|
||||
return true;
|
||||
},
|
||||
},
|
||||
targetConfigurationCommand: {
|
||||
updateConfiguration() {},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue