diff --git a/src/string_bytes.cc b/src/string_bytes.cc index 4f896ace3fb693..0042e9ac1c3f8f 100644 --- a/src/string_bytes.cc +++ b/src/string_bytes.cc @@ -681,7 +681,7 @@ Local StringBytes::Encode(Isolate* isolate, Local val; switch (encoding) { case BUFFER: - return scope.Escape(Buffer::New(buf, buflen)); + return scope.Escape(Buffer::New(isolate, buf, buflen)); case ASCII: if (contains_non_ascii(buf, buflen)) {