From 7be96f52857732d64d88ea98d70308f97a7ddf97 Mon Sep 17 00:00:00 2001 From: Yazhong Liu Date: Thu, 14 Aug 2014 02:02:37 +0800 Subject: src: add missing Isolate arguments Reviewed-by: Trevor Norris --- src/node_file.cc | 2 +- src/stream_wrap.cc | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index d62fbe2ab..3b287ec1c 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -836,7 +836,7 @@ static void WriteString(const FunctionCallbackInfo& args) { string, const_cast(&buf), &len)) { - enum encoding enc = ParseEncoding(args[3], UTF8); + enum encoding enc = ParseEncoding(env->isolate(), args[3], UTF8); len = StringBytes::StorageSize(env->isolate(), string, enc); buf = new char[len]; // StorageSize may return too large a char, so correct the actual length diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index 697b5c4c5..5d6435101 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -401,7 +401,8 @@ void StreamWrap::Writev(const FunctionCallbackInfo& args) { // String chunk Handle string = chunk->ToString(); - enum encoding encoding = ParseEncoding(chunks->Get(i * 2 + 1)); + enum encoding encoding = ParseEncoding(env->isolate(), + chunks->Get(i * 2 + 1)); size_t chunk_size; if (encoding == UTF8 && string->Length() > 65535) chunk_size = StringBytes::Size(env->isolate(), string, encoding); @@ -444,7 +445,8 @@ void StreamWrap::Writev(const FunctionCallbackInfo& args) { size_t str_size = storage_size - offset; Handle string = chunk->ToString(); - enum encoding encoding = ParseEncoding(chunks->Get(i * 2 + 1)); + enum encoding encoding = ParseEncoding(env->isolate(), + chunks->Get(i * 2 + 1)); str_size = StringBytes::Write(env->isolate(), str_storage, str_size, -- cgit v1.2.3