1414 */
1515
1616import { sortDataTable } from '../utils/data-table-utils' ;
17- import { resourceTypes } from './data-structures ' ;
17+ import { ResourceType } from 'firefox-profiler/types ' ;
1818import { StringTable } from '../utils/string-table' ;
1919import { timeCode } from '../utils/time-code' ;
2020import { PROCESSED_PROFILE_VERSION } from '../app-logic/constants' ;
@@ -356,19 +356,19 @@ const _upgraders: {
356356 } ;
357357 function addLibResource ( name : number , lib : number ) {
358358 const index = newResourceTable . length ++ ;
359- newResourceTable . type [ index ] = resourceTypes . library ;
359+ newResourceTable . type [ index ] = ResourceType . Library ;
360360 newResourceTable . name [ index ] = name ;
361361 newResourceTable . lib [ index ] = lib ;
362362 }
363363 function addWebhostResource ( origin : number , host : number ) {
364364 const index = newResourceTable . length ++ ;
365- newResourceTable . type [ index ] = resourceTypes . webhost ;
365+ newResourceTable . type [ index ] = ResourceType . Webhost ;
366366 newResourceTable . name [ index ] = origin ;
367367 newResourceTable . host [ index ] = host ;
368368 }
369369 function addUrlResource ( url : number ) {
370370 const index = newResourceTable . length ++ ;
371- newResourceTable . type [ index ] = resourceTypes . url ;
371+ newResourceTable . type [ index ] = ResourceType . Url ;
372372 newResourceTable . name [ index ] = url ;
373373 }
374374 const oldResourceToNewResourceMap = new Map ( ) ;
@@ -378,7 +378,7 @@ const _upgraders: {
378378 resourceIndex < resourceTable . length ;
379379 resourceIndex ++
380380 ) {
381- if ( resourceTable . type [ resourceIndex ] === resourceTypes . library ) {
381+ if ( resourceTable . type [ resourceIndex ] === ResourceType . Library ) {
382382 oldResourceToNewResourceMap . set (
383383 resourceIndex ,
384384 newResourceTable . length
@@ -387,7 +387,7 @@ const _upgraders: {
387387 resourceTable . name [ resourceIndex ] ,
388388 resourceTable . lib [ resourceIndex ]
389389 ) ;
390- } else if ( resourceTable . type [ resourceIndex ] === resourceTypes . url ) {
390+ } else if ( resourceTable . type [ resourceIndex ] === ResourceType . Url ) {
391391 const scriptURI = stringTable . getString (
392392 resourceTable . name [ resourceIndex ]
393393 ) ;
@@ -1810,7 +1810,7 @@ const _upgraders: {
18101810 continue ;
18111811 }
18121812 const resourceType = resourceTable . type [ resourceIndex ] ;
1813- if ( resourceType !== resourceTypes . library ) {
1813+ if ( resourceType !== ResourceType . Library ) {
18141814 continue ;
18151815 }
18161816 const libIndex = resourceTable . lib [ resourceIndex ] ;
0 commit comments