@@ -453,10 +453,9 @@ void HistogramImpl::GetCount(const FunctionCallbackInfo<Value>& args) {
453453}
454454
455455void HistogramImpl::GetCountBigInt (const FunctionCallbackInfo<Value>& args) {
456- Environment* env = Environment::GetCurrent (args);
457456 HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
458457 args.GetReturnValue ().Set (
459- BigInt::NewFromUnsigned (env-> isolate (), (*histogram)->Count ()));
458+ BigInt::NewFromUnsigned (args. GetIsolate (), (*histogram)->Count ()));
460459}
461460
462461void HistogramImpl::GetMin (const FunctionCallbackInfo<Value>& args) {
@@ -466,9 +465,9 @@ void HistogramImpl::GetMin(const FunctionCallbackInfo<Value>& args) {
466465}
467466
468467void HistogramImpl::GetMinBigInt (const FunctionCallbackInfo<Value>& args) {
469- Environment* env = Environment::GetCurrent (args);
470468 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 ()));
472471}
473472
474473void HistogramImpl::GetMax (const FunctionCallbackInfo<Value>& args) {
@@ -478,9 +477,9 @@ void HistogramImpl::GetMax(const FunctionCallbackInfo<Value>& args) {
478477}
479478
480479void HistogramImpl::GetMaxBigInt (const FunctionCallbackInfo<Value>& args) {
481- Environment* env = Environment::GetCurrent (args);
482480 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 ()));
484483}
485484
486485void HistogramImpl::GetMean (const FunctionCallbackInfo<Value>& args) {
@@ -495,10 +494,9 @@ void HistogramImpl::GetExceeds(const FunctionCallbackInfo<Value>& args) {
495494}
496495
497496void HistogramImpl::GetExceedsBigInt (const FunctionCallbackInfo<Value>& args) {
498- Environment* env = Environment::GetCurrent (args);
499497 HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
500498 args.GetReturnValue ().Set (
501- BigInt::New (env-> isolate (), (*histogram)->Exceeds ()));
499+ BigInt::New (args. GetIsolate (), (*histogram)->Exceeds ()));
502500}
503501
504502void HistogramImpl::GetStddev (const FunctionCallbackInfo<Value>& args) {
@@ -516,12 +514,11 @@ void HistogramImpl::GetPercentile(const FunctionCallbackInfo<Value>& args) {
516514
517515void HistogramImpl::GetPercentileBigInt (
518516 const FunctionCallbackInfo<Value>& args) {
519- Environment* env = Environment::GetCurrent (args);
520517 HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
521518 CHECK (args[0 ]->IsNumber ());
522519 double percentile = args[0 ].As <Number>()->Value ();
523520 int64_t value = (*histogram)->Percentile (percentile);
524- args.GetReturnValue ().Set (BigInt::New (env-> isolate (), value));
521+ args.GetReturnValue ().Set (BigInt::New (args. GetIsolate (), value));
525522}
526523
527524void HistogramImpl::GetPercentiles (const FunctionCallbackInfo<Value>& args) {
0 commit comments