Skip to content

Commit

Permalink
src: fix deprecated use of Buffer::New()
Browse files Browse the repository at this point in the history
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 <trev.norris@gmail.com>
  • Loading branch information
bnoordhuis committed May 4, 2015
1 parent 3dafdc5 commit f696c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/string_bytes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ Local<Value> StringBytes::Encode(Isolate* isolate,
Local<String> 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)) {
Expand Down

0 comments on commit f696c9e

Please sign in to comment.