From 67403b3a849f86ccd03bcf3b829a89d74471f9ca Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Wed, 29 Aug 2018 15:39:09 +0200 Subject: src: remove calls to deprecated v8 functions (ToString) Remove all calls to deprecated v8 functions (here: Value::ToString) inside the code (src directory only). PR-URL: https://github.com/nodejs/node/pull/21935 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- src/string_bytes.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/string_bytes.cc') diff --git a/src/string_bytes.cc b/src/string_bytes.cc index b7f009fe1f..82d699db9a 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -410,7 +410,8 @@ size_t StringBytes::StorageSize(Isolate* isolate, return Buffer::Length(val); } - Local str = val->ToString(isolate); + Local str = + val->ToString(isolate->GetCurrentContext()).ToLocalChecked(); switch (encoding) { case ASCII: @@ -456,7 +457,8 @@ size_t StringBytes::Size(Isolate* isolate, if (Buffer::HasInstance(val) && (encoding == BUFFER || encoding == LATIN1)) return Buffer::Length(val); - Local str = val->ToString(isolate); + Local str = + val->ToString(isolate->GetCurrentContext()).ToLocalChecked(); switch (encoding) { case ASCII: -- cgit v1.2.3