@@ -2602,8 +2602,6 @@ const _upgraders = {
26022602 // - resourceTable
26032603 // - nativeSymbols
26042604 // They are now stored in profile.shared.
2605- const stackTableMap = new Map ( ) ;
2606- const frameTableMap = new Map ( ) ;
26072605 const funcTableMap = new Map ( ) ;
26082606 const resourceTableMap = new Map ( ) ;
26092607 const nativeSymbolsMap = new Map ( ) ;
@@ -2728,48 +2726,38 @@ const _upgraders = {
27282726 }
27292727 } ) ( ) ;
27302728 ( function integrateIntoSharedFrameTable ( ) {
2729+ // Don't attempt to deduplicate; just copy over all frames.
2730+ // The call node table will do the deduplication for us.
27312731 for ( let i = 0 ; i < frameTable . length ; i ++ ) {
2732- const address = frameTable . address [ i ] ;
2733- const inlineDepth = frameTable . inlineDepth [ i ] ;
2734- const category = frameTable . category [ i ] ;
2735- const subcategory = frameTable . subcategory [ i ] ;
2736- const func = funcTableIndexMap [ frameTable . func [ i ] ] ;
2737- const nativeSymbol = frameTable . nativeSymbol [ i ] ;
2738- const innerWindowID = frameTable . innerWindowID [ i ] ;
2739- const line = frameTable . line [ i ] ;
2740- const column = frameTable . column [ i ] ;
2741- const key = `${ address !== null ? address : '' } -${ inlineDepth !== null ? inlineDepth : '' } -${ category !== null ? category : '' } -${ subcategory !== null ? subcategory : '' } -${ func } -${ nativeSymbol !== null ? nativeSymbol : '' } -${ innerWindowID !== null ? innerWindowID : '' } -${ line !== null ? line : '' } -${ column !== null ? column : '' } ` ;
2742- let newIndex = frameTableMap . get ( key ) ;
2743- if ( newIndex === undefined ) {
2744- newIndex = newFrameTable . length ++ ;
2745- frameTableMap . set ( key , newIndex ) ;
2746- newFrameTable . address [ newIndex ] = address ;
2747- newFrameTable . inlineDepth [ newIndex ] = inlineDepth ;
2748- newFrameTable . category [ newIndex ] = category ;
2749- newFrameTable . subcategory [ newIndex ] = subcategory ;
2750- newFrameTable . func [ newIndex ] = func ;
2751- newFrameTable . nativeSymbol [ newIndex ] = nativeSymbol ;
2752- newFrameTable . innerWindowID [ newIndex ] = innerWindowID ;
2753- newFrameTable . line [ newIndex ] = line ;
2754- newFrameTable . column [ newIndex ] = column ;
2755- }
2732+ const newIndex = newFrameTable . length ++ ;
2733+ newFrameTable . address [ newIndex ] = frameTable . address [ i ] ;
2734+ newFrameTable . inlineDepth [ newIndex ] = frameTable . inlineDepth [ i ] ;
2735+ newFrameTable . category [ newIndex ] = frameTable . category [ i ] ;
2736+ newFrameTable . subcategory [ newIndex ] = frameTable . subcategory [ i ] ;
2737+ newFrameTable . func [ newIndex ] = funcTableIndexMap [ frameTable . func [ i ] ] ;
2738+ const oldNativeSymbol = frameTable . nativeSymbol [ i ] ;
2739+ const nativeSymbol =
2740+ oldNativeSymbol !== null
2741+ ? nativeSymbolsIndexMap [ oldNativeSymbol ]
2742+ : null ;
2743+ newFrameTable . nativeSymbol [ newIndex ] = nativeSymbol ;
2744+ newFrameTable . innerWindowID [ newIndex ] = frameTable . innerWindowID [ i ] ;
2745+ newFrameTable . line [ newIndex ] = frameTable . line [ i ] ;
2746+ newFrameTable . column [ newIndex ] = frameTable . column [ i ] ;
27562747 frameTableIndexMap [ i ] = newIndex ;
27572748 }
27582749 } ) ( ) ;
27592750 ( function integrateIntoSharedStackTable ( ) {
2751+ // Don't attempt to deduplicate; just copy over all stacks.
2752+ // The call node table will do the deduplication for us.
27602753 for ( let i = 0 ; i < stackTable . length ; i ++ ) {
27612754 const frame = frameTableIndexMap [ stackTable . frame [ i ] ] ;
27622755 const oldPrefix = stackTable . prefix [ i ] ;
27632756 const prefix =
27642757 oldPrefix !== null ? stackTableIndexMap [ oldPrefix ] : null ;
2765- const key = `${ frame } -${ prefix !== null ? prefix : '' } ` ;
2766- let newIndex = stackTableMap . get ( key ) ;
2767- if ( newIndex === undefined ) {
2768- newIndex = newStackTable . length ++ ;
2769- stackTableMap . set ( key , newIndex ) ;
2770- newStackTable . frame [ newIndex ] = frame ;
2771- newStackTable . prefix [ newIndex ] = prefix ;
2772- }
2758+ const newIndex = newStackTable . length ++ ;
2759+ newStackTable . frame [ newIndex ] = frame ;
2760+ newStackTable . prefix [ newIndex ] = prefix ;
27732761 stackTableIndexMap [ i ] = newIndex ;
27742762 }
27752763 } ) ( ) ;
0 commit comments