@@ -455,10 +455,9 @@ void HistogramImpl::GetCount(const FunctionCallbackInfo<Value>& args) {
455455}
456456
457457void HistogramImpl::GetCountBigInt (const FunctionCallbackInfo<Value>& args) {
458- Environment* env = Environment::GetCurrent (args);
459458 HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
460459 args.GetReturnValue ().Set (
461- BigInt::NewFromUnsigned (env-> isolate (), (*histogram)->Count ()));
460+ BigInt::NewFromUnsigned (args. GetIsolate (), (*histogram)->Count ()));
462461}
463462
464463void HistogramImpl::GetMin (const FunctionCallbackInfo<Value>& args) {
@@ -468,9 +467,9 @@ void HistogramImpl::GetMin(const FunctionCallbackInfo<Value>& args) {
468467}
469468
470469void HistogramImpl::GetMinBigInt (const FunctionCallbackInfo<Value>& args) {
471- Environment* env = Environment::GetCurrent (args);
472470 HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
473- args.GetReturnValue ().Set (BigInt::New (env->isolate (), (*histogram)->Min ()));
471+ args.GetReturnValue ().Set (
472+ BigInt::New (args.GetIsolate (), (*histogram)->Min ()));
474473}
475474
476475void HistogramImpl::GetMax (const FunctionCallbackInfo<Value>& args) {
@@ -480,9 +479,9 @@ void HistogramImpl::GetMax(const FunctionCallbackInfo<Value>& args) {
480479}
481480
482481void HistogramImpl::GetMaxBigInt (const FunctionCallbackInfo<Value>& args) {
483- Environment* env = Environment::GetCurrent (args);
484482 HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
485- args.GetReturnValue ().Set (BigInt::New (env->isolate (), (*histogram)->Max ()));
483+ args.GetReturnValue ().Set (
484+ BigInt::New (args.GetIsolate (), (*histogram)->Max ()));
486485}
487486
488487void HistogramImpl::GetMean (const FunctionCallbackInfo<Value>& args) {
@@ -497,10 +496,9 @@ void HistogramImpl::GetExceeds(const FunctionCallbackInfo<Value>& args) {
497496}
498497
499498void HistogramImpl::GetExceedsBigInt (const FunctionCallbackInfo<Value>& args) {
500- Environment* env = Environment::GetCurrent (args);
501499 HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
502500 args.GetReturnValue ().Set (
503- BigInt::New (env-> isolate (), (*histogram)->Exceeds ()));
501+ BigInt::New (args. GetIsolate (), (*histogram)->Exceeds ()));
504502}
505503
506504void HistogramImpl::GetStddev (const FunctionCallbackInfo<Value>& args) {
@@ -518,12 +516,11 @@ void HistogramImpl::GetPercentile(const FunctionCallbackInfo<Value>& args) {
518516
519517void HistogramImpl::GetPercentileBigInt (
520518 const FunctionCallbackInfo<Value>& args) {
521- Environment* env = Environment::GetCurrent (args);
522519 HistogramImpl* histogram = HistogramImpl::FromJSObject (args.This ());
523520 CHECK (args[0 ]->IsNumber ());
524521 double percentile = args[0 ].As <Number>()->Value ();
525522 int64_t value = (*histogram)->Percentile (percentile);
526- args.GetReturnValue ().Set (BigInt::New (env-> isolate (), value));
523+ args.GetReturnValue ().Set (BigInt::New (args. GetIsolate (), value));
527524}
528525
529526void HistogramImpl::GetPercentiles (const FunctionCallbackInfo<Value>& args) {
0 commit comments