Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
src: add missing Isolate arguments
Browse files Browse the repository at this point in the history
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
yorkie authored and trevnorris committed Aug 19, 2014
1 parent b9960ee commit 7be96f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/node_file.cc
Expand Up @@ -836,7 +836,7 @@ static void WriteString(const FunctionCallbackInfo<Value>& args) {
string,
const_cast<const char**>(&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
Expand Down
6 changes: 4 additions & 2 deletions src/stream_wrap.cc
Expand Up @@ -401,7 +401,8 @@ void StreamWrap::Writev(const FunctionCallbackInfo<Value>& args) {

// String chunk
Handle<String> 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);
Expand Down Expand Up @@ -444,7 +445,8 @@ void StreamWrap::Writev(const FunctionCallbackInfo<Value>& args) {
size_t str_size = storage_size - offset;

Handle<String> 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,
Expand Down

0 comments on commit 7be96f5

Please sign in to comment.