File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 33 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44
55import { StringTable } from '../utils/string-table' ;
6+ import { getEmptySourceTable } from './data-structures' ;
7+
68import type {
79 Lib ,
810 LibMapping ,
@@ -26,7 +28,7 @@ export class GlobalDataCollector {
2628 _libKeyToLibIndex : Map < string , IndexIntoLibs > = new Map ( ) ;
2729 _stringArray : string [ ] = [ ] ;
2830 _stringTable : StringTable = StringTable . withBackingArray ( this . _stringArray ) ;
29- _sources : SourceTable = { length : 0 , uuid : [ ] , filename : [ ] } ;
31+ _sources : SourceTable = getEmptySourceTable ( ) ;
3032 _uuidToSourceIndex : Map < string , IndexIntoSourceTable > = new Map ( ) ;
3133 _filenameToSourceIndex : Map < IndexIntoStringTable , IndexIntoSourceTable > =
3234 new Map ( ) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
1919 getEmptyRawMarkerTable ,
2020 getEmptySamplesTableWithEventDelay ,
2121 shallowCloneRawMarkerTable ,
22+ getEmptySourceTable ,
2223} from './data-structures' ;
2324import {
2425 filterRawThreadSamplesToRange ,
@@ -499,7 +500,7 @@ function mergeSources(
499500 sources : SourceTable ;
500501 translationMaps : TranslationMapForSources [ ] ;
501502} {
502- const newSources : SourceTable = { length : 0 , uuid : [ ] , filename : [ ] } ;
503+ const newSources = getEmptySourceTable ( ) ;
503504 const mapOfInsertedSources : Map < string , IndexIntoSourceTable > = new Map ( ) ;
504505
505506 const translationMaps = sourcesPerProfile . map ( ( sources , profileIndex ) => {
You can’t perform that action at this time.
0 commit comments