src: remove unnecessary `Environment::GetCurrent()` calls · nodejs/node@f0c20cc
@@ -455,10 +455,9 @@ void HistogramImpl::GetCount(const FunctionCallbackInfo<Value>& args) {
455455}
456456457457void 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}
463462464463void HistogramImpl::GetMin(const FunctionCallbackInfo<Value>& args) {
@@ -468,9 +467,9 @@ void HistogramImpl::GetMin(const FunctionCallbackInfo<Value>& args) {
468467}
469468470469void 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}
475474476475void HistogramImpl::GetMax(const FunctionCallbackInfo<Value>& args) {
@@ -480,9 +479,9 @@ void HistogramImpl::GetMax(const FunctionCallbackInfo<Value>& args) {
480479}
481480482481void 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}
487486488487void HistogramImpl::GetMean(const FunctionCallbackInfo<Value>& args) {
@@ -497,10 +496,9 @@ void HistogramImpl::GetExceeds(const FunctionCallbackInfo<Value>& args) {
497496}
498497499498void 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}
505503506504void HistogramImpl::GetStddev(const FunctionCallbackInfo<Value>& args) {
@@ -518,12 +516,11 @@ void HistogramImpl::GetPercentile(const FunctionCallbackInfo<Value>& args) {
518516519517void HistogramImpl::GetPercentileBigInt(
520518const FunctionCallbackInfo<Value>& args) {
521- Environment* env = Environment::GetCurrent(args);
522519 HistogramImpl* histogram = HistogramImpl::FromJSObject(args.This());
523520CHECK(args[0]->IsNumber());
524521double percentile = args[0].As<Number>()->Value();
525522int64_t value = (*histogram)->Percentile(percentile);
526- args.GetReturnValue().Set(BigInt::New(env->isolate(), value));
523+ args.GetReturnValue().Set(BigInt::New(args.GetIsolate(), value));
527524}
528525529526void HistogramImpl::GetPercentiles(const FunctionCallbackInfo<Value>& args) {