diff --git a/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml b/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml index 98fea27e9..140bbcc34 100644 --- a/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml +++ b/data/dbus-interfaces/org.gnome.Shell.PerfHelper.xml @@ -1,5 +1,6 @@ + diff --git a/js/ui/scripting.js b/js/ui/scripting.js index a4d80d749..76a74d5e8 100644 --- a/js/ui/scripting.js +++ b/js/ui/scripting.js @@ -284,6 +284,15 @@ async function _runPerfScript(scriptModule, outputFile) { log(`Script failed: ${err}\n${err.stack}`); Meta.exit(Meta.ExitCode.ERROR); } + + try { + const perfHelper = _getPerfHelper(); + perfHelper.ExitSync(); + } catch (err) { + log(`Failed to exit helper: ${err}\n${err.stack}`); + Meta.exit(Meta.ExitCode.ERROR); + } + Meta.exit(Meta.ExitCode.SUCCESS); }