summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-08-26 10:28:17 +0200
committerMichaël Zasso <targos@protonmail.com>2018-09-06 08:53:45 +0200
commitf576425841b34460a24ca82737627845a50ff5ea (patch)
tree2a21e4e9daf34dd95d20a0f840cb44118f86c5ae /src/util.cc
parent9140edfdcd784afedc816859442e6d39a2161197 (diff)
downloadnode-new-f576425841b34460a24ca82737627845a50ff5ea.tar.gz
src: use String::Write{OneByte,Utf8} with isolate
PR-URL: https://github.com/nodejs/node/pull/22531 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.cc b/src/util.cc
index 66be18eae2..c36ea5169d 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -45,7 +45,8 @@ static void MakeUtf8String(Isolate* isolate,
target->AllocateSufficientStorage(storage);
const int flags =
String::NO_NULL_TERMINATION | String::REPLACE_INVALID_UTF8;
- const int length = string->WriteUtf8(target->out(), storage, 0, flags);
+ const int length =
+ string->WriteUtf8(isolate, target->out(), storage, 0, flags);
target->SetLengthAndZeroTerminate(length);
}
@@ -71,7 +72,7 @@ TwoByteValue::TwoByteValue(Isolate* isolate, Local<Value> value) {
AllocateSufficientStorage(storage);
const int flags = String::NO_NULL_TERMINATION;
- const int length = string->Write(out(), 0, storage, flags);
+ const int length = string->Write(isolate, out(), 0, storage, flags);
SetLengthAndZeroTerminate(length);
}