Bug 1776694 - Use the shared libraries that's provided by getProfileDataAsGzippedArrayBuffer r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D172556
This commit is contained in:
Nazım Can Altınova 2023-03-15 18:19:32 +00:00
Родитель 5d4ab6bd13
Коммит 6d6cf5839a
1 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -333,13 +333,20 @@ async function captureProfile(pageContext) {
// more samples while the parent process waits for subprocess profiles.
Services.profiler.Pause();
/**
* @type {MockedExports.ProfileGenerationAdditionalInformation | undefined}
*/
let additionalInfo;
/**
* @type {ProfileCaptureResult}
*/
const profileCaptureResult = await Services.profiler
.getProfileDataAsGzippedArrayBuffer()
.then(
({ profile }) => ({ type: "SUCCESS", profile }),
({ profile, additionalInformation }) => {
additionalInfo = additionalInformation;
return { type: "SUCCESS", profile };
},
error => {
console.error(error);
return { type: "ERROR", error };
@ -347,7 +354,9 @@ async function captureProfile(pageContext) {
);
const profilerViewMode = getProfilerViewModeForCurrentPreset(pageContext);
const sharedLibraries = Services.profiler.sharedLibraries;
const sharedLibraries = additionalInfo?.sharedLibraries
? additionalInfo.sharedLibraries
: Services.profiler.sharedLibraries;
const objdirs = getObjdirPrefValue();
const { createLocalSymbolicationService } = lazy.PerfSymbolication();