Skip to content

Commit f696c9e

Browse files
committed
src: fix deprecated use of Buffer::New()
Pass the isolate explicitly. Overlooked in commit ccb199a ("src: fix deprecation warnings") because g++ 4.8 and 4.9 don't warn for it whereas g++ 5.1 does. PR-URL: #1577 Reviewed-By: Trevor Norris <[email protected]>
1 parent 3dafdc5 commit f696c9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/string_bytes.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ Local<Value> StringBytes::Encode(Isolate* isolate,
681681
Local<String> val;
682682
switch (encoding) {
683683
case BUFFER:
684-
return scope.Escape(Buffer::New(buf, buflen));
684+
return scope.Escape(Buffer::New(isolate, buf, buflen));
685685

686686
case ASCII:
687687
if (contains_non_ascii(buf, buflen)) {

0 commit comments

Comments
 (0)