@@ -536,8 +536,10 @@ function _extractJsFunction(
536536 // Look up the UUID for this source index from the process's sources table
537537 if ( geckoSourceTable && geckoSourceIdx < geckoSourceTable . data . length ) {
538538 const uuidIndex = geckoSourceTable . schema . uuid ;
539+ const filenameIndex = geckoSourceTable . schema . filename ;
539540 const uuid = geckoSourceTable . data [ geckoSourceIdx ] [ uuidIndex ] ;
540- processedSourceIndex = globalDataCollector . getSourceIndexByUuid ( uuid ) ;
541+ const filename = geckoSourceTable . data [ geckoSourceIdx ] [ filenameIndex ] ;
542+ processedSourceIndex = globalDataCollector . indexForSource ( uuid , filename ) ;
541543 }
542544 }
543545
@@ -1657,37 +1659,6 @@ export function processGeckoOrDevToolsProfile(json: unknown): Profile {
16571659 return processGeckoProfile ( geckoProfile ) ;
16581660}
16591661
1660- /**
1661- * Process source table from all processes and populate the global data
1662- * collector with UUID-to-index mappings.
1663- */
1664- function _processSourceTable (
1665- geckoProfile : GeckoProfile ,
1666- globalDataCollector : GlobalDataCollector
1667- ) : void {
1668- // Process the main process sources table if it exists
1669- if ( geckoProfile . sources ) {
1670- const schema = geckoProfile . sources . schema ;
1671- for ( const data of geckoProfile . sources . data ) {
1672- const uuid = data [ schema . uuid ] ;
1673- const filename = data [ schema . filename ] ;
1674- globalDataCollector . indexForSource ( uuid , filename ) ;
1675- }
1676- }
1677-
1678- // Process sources from all subprocesses
1679- for ( const subprocessProfile of geckoProfile . processes ) {
1680- if ( subprocessProfile . sources ) {
1681- const schema = subprocessProfile . sources . schema ;
1682- for ( const data of subprocessProfile . sources . data ) {
1683- const uuid = data [ schema . uuid ] ;
1684- const filename = data [ schema . filename ] ;
1685- globalDataCollector . indexForSource ( uuid , filename ) ;
1686- }
1687- }
1688- }
1689- }
1690-
16911662/**
16921663 * Convert a profile from the Gecko format into the processed format.
16931664 * Throws an exception if it encounters an incompatible profile.
@@ -1710,9 +1681,6 @@ export function processGeckoProfile(geckoProfile: GeckoProfile): Profile {
17101681
17111682 const globalDataCollector = new GlobalDataCollector ( ) ;
17121683
1713- // Process sources from all processes (main + subprocesses)
1714- _processSourceTable ( geckoProfile , globalDataCollector ) ;
1715-
17161684 for ( const thread of geckoProfile . threads ) {
17171685 threads . push (
17181686 _processThread (
0 commit comments