33const {
44 ArrayIsArray,
55 ArrayPrototypeFilter,
6+ ArrayPrototypeForEach,
67 ArrayPrototypeIncludes,
78 ArrayPrototypeMap,
89 ArrayPrototypePush,
@@ -375,13 +376,13 @@ class PerformanceObserver {
375376 disconnect ( ) {
376377 const observerCountsGC = observerCounts [ NODE_PERFORMANCE_ENTRY_TYPE_GC ] ;
377378 const types = this [ kTypes ] ;
378- for ( const key of ObjectKeys ( types ) ) {
379+ ArrayPrototypeForEach ( ObjectKeys ( types ) , ( key ) => {
379380 const item = types [ key ] ;
380381 if ( item ) {
381382 L . remove ( item ) ;
382383 observerCounts [ key ] -- ;
383384 }
384- }
385+ } ) ;
385386 this [ kTypes ] = { } ;
386387 if ( observerCountsGC === 1 &&
387388 observerCounts [ NODE_PERFORMANCE_ENTRY_TYPE_GC ] === 0 ) {
@@ -408,14 +409,14 @@ class PerformanceObserver {
408409 this [ kBuffer ] [ kEntries ] = [ ] ;
409410 L . init ( this [ kBuffer ] [ kEntries ] ) ;
410411 this [ kBuffering ] = Boolean ( options . buffered ) ;
411- for ( const entryType of filteredEntryTypes ) {
412+ ArrayPrototypeForEach ( filteredEntryTypes , ( entryType ) => {
412413 const list = getObserversList ( entryType ) ;
413- if ( this [ kTypes ] [ entryType ] ) continue ;
414+ if ( this [ kTypes ] [ entryType ] ) return ;
414415 const item = { obs : this } ;
415416 this [ kTypes ] [ entryType ] = item ;
416417 L . append ( list , item ) ;
417418 observerCounts [ entryType ] ++ ;
418- }
419+ } ) ;
419420 if ( observerCountsGC === 0 &&
420421 observerCounts [ NODE_PERFORMANCE_ENTRY_TYPE_GC ] === 1 ) {
421422 installGarbageCollectionTracking ( ) ;
@@ -640,6 +641,7 @@ function sortedInsert(list, entry) {
640641}
641642
642643class ELDHistogram extends Histogram {
644+ constructor ( i ) { super ( i ) ; } // eslint-disable-line no-useless-constructor
643645 enable ( ) { return this [ kHandle ] . enable ( ) ; }
644646 disable ( ) { return this [ kHandle ] . disable ( ) ; }
645647}
0 commit comments