diff options
author | Sarat Addepalli <sarat.addepalli@paytm.com> | 2018-03-20 20:59:17 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-03-23 10:50:03 +0300 |
commit | c6c957d3cc3de335a0ccc25506d570b0a237a0ce (patch) | |
tree | 011861e35c1204d1a2f7c4f5eb76db4bea1644ee /src/string_bytes.cc | |
parent | 43506f1013c5568243dc800c42536d5aa72a3589 (diff) |
src: fix upcoming V8 deprecation warnings
PR-URL: https://github.com/nodejs/node/pull/19490
Fixes: https://github.com/nodejs/node/issues/18909
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'src/string_bytes.cc')
-rw-r--r-- | src/string_bytes.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string_bytes.cc b/src/string_bytes.cc index d7c2ef0c52f..2b485746dff 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -369,7 +369,7 @@ size_t StringBytes::Write(Isolate* isolate, auto ext = str->GetExternalOneByteStringResource(); nbytes = base64_decode(buf, buflen, ext->data(), ext->length()); } else { - String::Value value(str); + String::Value value(isolate, str); nbytes = base64_decode(buf, buflen, *value, value.length()); } *chars_written = nbytes; @@ -380,7 +380,7 @@ size_t StringBytes::Write(Isolate* isolate, auto ext = str->GetExternalOneByteStringResource(); nbytes = hex_decode(buf, buflen, ext->data(), ext->length()); } else { - String::Value value(str); + String::Value value(isolate, str); nbytes = hex_decode(buf, buflen, *value, value.length()); } *chars_written = nbytes; @@ -479,7 +479,7 @@ size_t StringBytes::Size(Isolate* isolate, return str->Length() * sizeof(uint16_t); case BASE64: { - String::Value value(str); + String::Value value(isolate, str); return base64_decoded_size(*value, value.length()); } |