| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -322,12 +322,11 @@ class PerformanceObserver extends AsyncResource { | |||
| 322 | 322 | disconnect() { | |
| 323 | 323 | const observerCountsGC = observerCounts[NODE_PERFORMANCE_ENTRY_TYPE_GC]; | |
| 324 | 324 | 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]; | ||
| 328 | 327 | if (item) { | |
| 329 | 328 | L.remove(item); | |
| 330 | - observerCounts[keys[n]]--; | ||
| 329 | + observerCounts[key]--; | ||
| 331 | 330 | } | |
| 332 | 331 | } | |
| 333 | 332 | this[kTypes] = {}; | |
@@ -353,8 +352,7 @@ class PerformanceObserver extends AsyncResource { | |||
| 353 | 352 | this[kBuffer][kEntries] = []; | |
| 354 | 353 | L.init(this[kBuffer][kEntries]); | |
| 355 | 354 | 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) { | ||
| 358 | 356 | const list = getObserversList(entryType); | |
| 359 | 357 | if (this[kTypes][entryType]) continue; | |
| 360 | 358 | const item = { obs: this }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments