|
1 | 1 | 'use strict'; |
2 | 2 | |
3 | 3 | const { |
| 4 | + Map, |
| 5 | + MapPrototypeClear, |
4 | 6 | MapPrototypeEntries, |
5 | 7 | NumberIsNaN, |
6 | 8 | NumberMAX_SAFE_INTEGER, |
7 | 9 | ObjectFromEntries, |
8 | 10 | ReflectConstruct, |
9 | | - SafeMap, |
10 | 11 | Symbol, |
11 | 12 | } = primordials; |
12 | 13 | |
@@ -216,7 +217,7 @@ class Histogram {
|
216 | 217 | get percentiles() { |
217 | 218 | if (!isHistogram(this)) |
218 | 219 | throw new ERR_INVALID_THIS('Histogram'); |
219 | | -this[kMap].clear(); |
| 220 | +MapPrototypeClear(this[kMap]); |
220 | 221 | this[kHandle]?.percentiles(this[kMap]); |
221 | 222 | return this[kMap]; |
222 | 223 | } |
@@ -228,7 +229,7 @@ class Histogram {
|
228 | 229 | get percentilesBigInt() { |
229 | 230 | if (!isHistogram(this)) |
230 | 231 | throw new ERR_INVALID_THIS('Histogram'); |
231 | | -this[kMap].clear(); |
| 232 | +MapPrototypeClear(this[kMap]); |
232 | 233 | this[kHandle]?.percentilesBigInt(this[kMap]); |
233 | 234 | return this[kMap]; |
234 | 235 | } |
@@ -331,7 +332,7 @@ function ClonedHistogram(handle) {
|
331 | 332 | function() { |
332 | 333 | markTransferMode(this, true, false); |
333 | 334 | this[kHandle] = handle; |
334 | | -this[kMap] = new SafeMap(); |
| 335 | +this[kMap] = new Map(); |
335 | 336 | }, [], Histogram); |
336 | 337 | } |
337 | 338 | |
@@ -342,7 +343,7 @@ function ClonedRecordableHistogram(handle) {
|
342 | 343 | |
343 | 344 | markTransferMode(histogram, true, false); |
344 | 345 | histogram[kRecordable] = true; |
345 | | -histogram[kMap] = new SafeMap(); |
| 346 | +histogram[kMap] = new Map(); |
346 | 347 | histogram[kHandle] = handle; |
347 | 348 | histogram.constructor = RecordableHistogram; |
348 | 349 | |
|