| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9b4a49c commit c146fff
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -354,6 +354,7 @@ class PerformanceObserver extends AsyncResource { | |||
| 354 | 354 | for (var n = 0; n < entryTypes.length; n++) { | |
| 355 | 355 | const entryType = entryTypes[n]; | |
| 356 | 356 | const list = getObserversList(entryType); | |
| 357 | + if (this[kTypes][entryType]) continue; | ||
| 357 | 358 | const item = { obs: this }; | |
| 358 | 359 | this[kTypes][entryType] = item; | |
| 359 | 360 | L.append(list, item); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,6 +62,12 @@ assert.strictEqual(counts[NODE_PERFORMANCE_ENTRY_TYPE_FUNCTION], 0); | |||
| 62 | 62 | 'for option "entryTypes"' | |
| 63 | 63 | }); | |
| 64 | 64 | }); | |
| 65 | + | ||
| 66 | + const obs = new PerformanceObserver(common.mustNotCall()); | ||
| 67 | + obs.observe({ entryTypes: ['mark', 'mark'] }); | ||
| 68 | + obs.disconnect(); | ||
| 69 | + performance.mark('42'); | ||
| 70 | + assert.strictEqual(counts[NODE_PERFORMANCE_ENTRY_TYPE_MARK], 0); | ||
| 65 | 71 | } | |
| 66 | 72 | ||
| 67 | 73 | // Test Non-Buffered | |
| Back | FazBrowse Home | New Git URL |
0 commit comments