File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -322,12 +322,11 @@ class PerformanceObserver extends AsyncResource {
322322 disconnect ( ) {
323323 const observerCountsGC = observerCounts [ NODE_PERFORMANCE_ENTRY_TYPE_GC ] ;
324324 const types = this [ kTypes ] ;
325- const keys = ObjectKeys ( types ) ;
326- for ( var n = 0 ; n < keys . length ; n ++ ) {
327- const item = types [ keys [ n ] ] ;
325+ for ( const key of ObjectKeys ( types ) ) {
326+ const item = types [ key ] ;
328327 if ( item ) {
329328 L . remove ( item ) ;
330- observerCounts [ keys [ n ] ] -- ;
329+ observerCounts [ key ] -- ;
331330 }
332331 }
333332 this [ kTypes ] = { } ;
@@ -353,8 +352,7 @@ class PerformanceObserver extends AsyncResource {
353352 this [ kBuffer ] [ kEntries ] = [ ] ;
354353 L . init ( this [ kBuffer ] [ kEntries ] ) ;
355354 this [ kBuffering ] = Boolean ( options . buffered ) ;
356- for ( var n = 0 ; n < entryTypes . length ; n ++ ) {
357- const entryType = entryTypes [ n ] ;
355+ for ( const entryType of entryTypes ) {
358356 const list = getObserversList ( entryType ) ;
359357 if ( this [ kTypes ] [ entryType ] ) continue ;
360358 const item = { obs : this } ;
You can’t perform that action at this time.
0 commit comments