From f696c9efabd7efc962c6f01ac111c5809117ba95 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 1 May 2015 17:18:16 +0200 Subject: [PATCH] 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: https://github.com/iojs/io.js/pull/1577 Reviewed-By: Trevor Norris --- src/string_bytes.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) {