summaryrefslogtreecommitdiff
path: root/src/string_bytes.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_bytes.cc')
-rw-r--r--src/string_bytes.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/string_bytes.cc b/src/string_bytes.cc
index 8acba5d55d..d9e8b97114 100644
--- a/src/string_bytes.cc
+++ b/src/string_bytes.cc
@@ -53,7 +53,7 @@ class ExternString: public ResourceType {
if (length == 0)
return scope.Escape(String::Empty(isolate));
- TypeName* new_data = node::Malloc<TypeName>(length);
+ TypeName* new_data = node::UncheckedMalloc<TypeName>(length);
if (new_data == nullptr) {
return Local<String>();
}
@@ -623,7 +623,7 @@ Local<Value> StringBytes::Encode(Isolate* isolate,
case ASCII:
if (contains_non_ascii(buf, buflen)) {
- char* out = node::Malloc(buflen);
+ char* out = node::UncheckedMalloc(buflen);
if (out == nullptr) {
return Local<String>();
}
@@ -658,7 +658,7 @@ Local<Value> StringBytes::Encode(Isolate* isolate,
case BASE64: {
size_t dlen = base64_encoded_size(buflen);
- char* dst = node::Malloc(dlen);
+ char* dst = node::UncheckedMalloc(dlen);
if (dst == nullptr) {
return Local<String>();
}
@@ -677,7 +677,7 @@ Local<Value> StringBytes::Encode(Isolate* isolate,
case HEX: {
size_t dlen = buflen * 2;
- char* dst = node::Malloc(dlen);
+ char* dst = node::UncheckedMalloc(dlen);
if (dst == nullptr) {
return Local<String>();
}