aboutsummaryrefslogtreecommitdiff
path: root/src/node_buffer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_buffer.cc')
-rw-r--r--src/node_buffer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index 138c26685f..e810760790 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -606,7 +606,7 @@ void Fill(const FunctionCallbackInfo<Value>& args) {
return;
}
- str_obj = args[1]->ToString(env->isolate());
+ str_obj = args[1]->ToString(env->context()).ToLocalChecked();
enc = ParseEncoding(env->isolate(), args[4], UTF8);
str_length =
enc == UTF8 ? str_obj->Utf8Length() :
@@ -677,7 +677,7 @@ void StringWrite(const FunctionCallbackInfo<Value>& args) {
if (!args[0]->IsString())
return env->ThrowTypeError("Argument must be a string");
- Local<String> str = args[0]->ToString(env->isolate());
+ Local<String> str = args[0]->ToString(env->context()).ToLocalChecked();
size_t offset;
size_t max_length;