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