mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
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 <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
b9c0d5e349
commit
ee237e3e55
3 files changed
+16
-10
No files matched your search
+4
-2
@@ -410,7 +410,8 @@ size_t StringBytes::StorageSize(Isolate* isolate,
|
||||
return Buffer::Length(val);
|
||||
}
|
||||
|
||||
Local<String> str = val->ToString(isolate);
|
||||
Local<String> 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<String> str = val->ToString(isolate);
|
||||
Local<String> str =
|
||||
val->ToString(isolate->GetCurrentContext()).ToLocalChecked();
|
||||
|
||||
switch (encoding) {
|
||||
case ASCII:
|
||||
|
||||
Reference in new issue
Block a user