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 @@ -320,12 +320,11 @@ class PerformanceObserver extends AsyncResource {
320320 disconnect ( ) {
321321 const observerCountsGC = observerCounts [ NODE_PERFORMANCE_ENTRY_TYPE_GC ] ;
322322 const types = this [ kTypes ] ;
323- const keys = ObjectKeys ( types ) ;
324- for ( var n = 0 ; n < keys . length ; n ++ ) {
325- const item = types [ keys [ n ] ] ;
323+ for ( const key of ObjectKeys ( types ) ) {
324+ const item = types [ key ] ;
326325 if ( item ) {
327326 L . remove ( item ) ;
328- observerCounts [ keys [ n ] ] -- ;
327+ observerCounts [ key ] -- ;
329328 }
330329 }
331330 this [ kTypes ] = { } ;
@@ -351,8 +350,7 @@ class PerformanceObserver extends AsyncResource {
351350 this [ kBuffer ] [ kEntries ] = [ ] ;
352351 L . init ( this [ kBuffer ] [ kEntries ] ) ;
353352 this [ kBuffering ] = Boolean ( options . buffered ) ;
354- for ( var n = 0 ; n < entryTypes . length ; n ++ ) {
355- const entryType = entryTypes [ n ] ;
353+ for ( const entryType of entryTypes ) {
356354 const list = getObserversList ( entryType ) ;
357355 if ( this [ kTypes ] [ entryType ] ) continue ;
358356 const item = { obs : this } ;
You can’t perform that action at this time.
0 commit comments