summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/node_perf.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/node_perf.cc b/src/node_perf.cc
index 908c76c211..e16be29a87 100644
--- a/src/node_perf.cc
+++ b/src/node_perf.cc
@@ -333,10 +333,9 @@ inline Local<Value> GetName(Local<Function> fn) {
// execution.
void TimerFunctionCall(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
- HandleScope scope(isolate);
- Environment* env = Environment::GetCurrent(isolate);
+ Local<Context> context = isolate->GetCurrentContext();
+ Environment* env = Environment::GetCurrent(context);
CHECK_NOT_NULL(env);
- Local<Context> context = env->context();
Local<Function> fn = args.Data().As<Function>();
size_t count = args.Length();
size_t idx;