@@ -245,9 +245,8 @@ describe('converting Google Chrome profile', function () {
245245 'src/test/fixtures/upgrades/chrome-tracing.json.gz'
246246 ) ;
247247 const decompressedBuffer = zlib . gunzipSync ( compressedBuffer ) ;
248- const profile = await unserializeProfileOfArbitraryFormat (
249- decompressedBuffer . buffer
250- ) ;
248+ const profile =
249+ await unserializeProfileOfArbitraryFormat ( decompressedBuffer ) ;
251250 if ( profile === undefined ) {
252251 throw new Error ( 'Unable to parse the profile.' ) ;
253252 }
@@ -263,9 +262,8 @@ describe('converting Google Chrome profile', function () {
263262 'src/test/fixtures/upgrades/chrome-trace-issue-5429.json.gz'
264263 ) ;
265264 const decompressedBuffer = zlib . gunzipSync ( compressedBuffer ) ;
266- const profile = await unserializeProfileOfArbitraryFormat (
267- decompressedBuffer . buffer
268- ) ;
265+ const profile =
266+ await unserializeProfileOfArbitraryFormat ( decompressedBuffer ) ;
269267 if ( profile === undefined ) {
270268 throw new Error ( 'Unable to parse the profile.' ) ;
271269 }
@@ -425,8 +423,9 @@ describe('converting ART trace', function () {
425423 const buffer = fs . readFileSync (
426424 'src/test/fixtures/upgrades/art-trace-regular.trace.gz'
427425 ) ;
428- const arrayBuffer = zlib . gunzipSync ( buffer ) . buffer ;
429- const profile = await unserializeProfileOfArbitraryFormat ( arrayBuffer ) ;
426+ const uncompressedBytes = zlib . gunzipSync ( buffer ) ;
427+ const profile =
428+ await unserializeProfileOfArbitraryFormat ( uncompressedBytes ) ;
430429 if ( profile === undefined ) {
431430 throw new Error ( 'Unable to parse the profile.' ) ;
432431 }
@@ -440,8 +439,9 @@ describe('converting ART trace', function () {
440439 const buffer = fs . readFileSync (
441440 'src/test/fixtures/upgrades/art-trace-streaming.trace.gz'
442441 ) ;
443- const arrayBuffer = zlib . gunzipSync ( buffer ) . buffer ;
444- const profile = await unserializeProfileOfArbitraryFormat ( arrayBuffer ) ;
442+ const uncompressedBytes = zlib . gunzipSync ( buffer ) ;
443+ const profile =
444+ await unserializeProfileOfArbitraryFormat ( uncompressedBytes ) ;
445445 if ( profile === undefined ) {
446446 throw new Error ( 'Unable to parse the profile.' ) ;
447447 }
@@ -457,8 +457,9 @@ describe('converting Simpleperf trace', function () {
457457 const buffer = fs . readFileSync (
458458 'src/test/fixtures/upgrades/simpleperf-task-clock.trace.gz'
459459 ) ;
460- const arrayBuffer = zlib . gunzipSync ( buffer ) . buffer ;
461- const profile = await unserializeProfileOfArbitraryFormat ( arrayBuffer ) ;
460+ const uncompressedBytes = zlib . gunzipSync ( buffer ) ;
461+ const profile =
462+ await unserializeProfileOfArbitraryFormat ( uncompressedBytes ) ;
462463 if ( profile === undefined ) {
463464 throw new Error ( 'Unable to parse the profile.' ) ;
464465 }
@@ -472,8 +473,9 @@ describe('converting Simpleperf trace', function () {
472473 const buffer = fs . readFileSync (
473474 'src/test/fixtures/upgrades/simpleperf-cpu-clock.trace.gz'
474475 ) ;
475- const arrayBuffer = zlib . gunzipSync ( buffer ) . buffer ;
476- const profile = await unserializeProfileOfArbitraryFormat ( arrayBuffer ) ;
476+ const uncompressedBytes = zlib . gunzipSync ( buffer ) ;
477+ const profile =
478+ await unserializeProfileOfArbitraryFormat ( uncompressedBytes ) ;
477479 if ( profile === undefined ) {
478480 throw new Error ( 'Unable to parse the profile.' ) ;
479481 }
0 commit comments