@@ -453,10 +453,9 @@ void HistogramImpl::GetCount(const FunctionCallbackInfo<Value>& args) {
453
453
}
454
454
455
455
void HistogramImpl::GetCountBigInt (const FunctionCallbackInfo<Value>& args) {
456
- Environment* env = Environment::GetCurrent (args);
457
456
HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
458
457
args.GetReturnValue ().Set (
459
- BigInt::NewFromUnsigned (env-> isolate (), (*histogram)->Count ()));
458
+ BigInt::NewFromUnsigned (args. GetIsolate (), (*histogram)->Count ()));
460
459
}
461
460
462
461
void HistogramImpl::GetMin (const FunctionCallbackInfo<Value>& args) {
@@ -466,9 +465,9 @@ void HistogramImpl::GetMin(const FunctionCallbackInfo<Value>& args) {
466
465
}
467
466
468
467
void HistogramImpl::GetMinBigInt (const FunctionCallbackInfo<Value>& args) {
469
- Environment* env = Environment::GetCurrent (args);
470
468
HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
471
- args.GetReturnValue ().Set (BigInt::New (env->isolate (), (*histogram)->Min ()));
469
+ args.GetReturnValue ().Set (
470
+ BigInt::New (args.GetIsolate (), (*histogram)->Min ()));
472
471
}
473
472
474
473
void HistogramImpl::GetMax (const FunctionCallbackInfo<Value>& args) {
@@ -478,9 +477,9 @@ void HistogramImpl::GetMax(const FunctionCallbackInfo<Value>& args) {
478
477
}
479
478
480
479
void HistogramImpl::GetMaxBigInt (const FunctionCallbackInfo<Value>& args) {
481
- Environment* env = Environment::GetCurrent (args);
482
480
HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
483
- args.GetReturnValue ().Set (BigInt::New (env->isolate (), (*histogram)->Max ()));
481
+ args.GetReturnValue ().Set (
482
+ BigInt::New (args.GetIsolate (), (*histogram)->Max ()));
484
483
}
485
484
486
485
void HistogramImpl::GetMean (const FunctionCallbackInfo<Value>& args) {
@@ -495,10 +494,9 @@ void HistogramImpl::GetExceeds(const FunctionCallbackInfo<Value>& args) {
495
494
}
496
495
497
496
void HistogramImpl::GetExceedsBigInt (const FunctionCallbackInfo<Value>& args) {
498
- Environment* env = Environment::GetCurrent (args);
499
497
HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
500
498
args.GetReturnValue ().Set (
501
- BigInt::New (env-> isolate (), (*histogram)->Exceeds ()));
499
+ BigInt::New (args. GetIsolate (), (*histogram)->Exceeds ()));
502
500
}
503
501
504
502
void HistogramImpl::GetStddev (const FunctionCallbackInfo<Value>& args) {
@@ -516,12 +514,11 @@ void HistogramImpl::GetPercentile(const FunctionCallbackInfo<Value>& args) {
516
514
517
515
void HistogramImpl::GetPercentileBigInt (
518
516
const FunctionCallbackInfo<Value>& args) {
519
- Environment* env = Environment::GetCurrent (args);
520
517
HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
521
518
CHECK (args[0 ]->IsNumber ());
522
519
double percentile = args[0 ].As <Number>()->Value ();
523
520
int64_t value = (*histogram)->Percentile (percentile);
524
- args.GetReturnValue ().Set (BigInt::New (env-> isolate (), value));
521
+ args.GetReturnValue ().Set (BigInt::New (args. GetIsolate (), value));
525
522
}
526
523
527
524
void HistogramImpl::GetPercentiles (const FunctionCallbackInfo<Value>& args) {
0 commit comments