summaryrefslogtreecommitdiff
path: root/src/node_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_file.cc')
-rw-r--r--src/node_file.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_file.cc b/src/node_file.cc
index 88b1262e16..e6ef3cbbf2 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -927,7 +927,7 @@ static void Read(const FunctionCallbackInfo<Value>& args) {
return env->ThrowError("Second argument needs to be a buffer");
}
- Local<Object> buffer_obj = args[1]->ToObject();
+ Local<Object> buffer_obj = args[1]->ToObject(env->isolate());
char *buffer_data = Buffer::Data(buffer_obj);
size_t buffer_length = Buffer::Length(buffer_obj);