summaryrefslogtreecommitdiff
path: root/src/node_zlib.cc
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2014-03-13 20:38:14 +0400
committerFedor Indutny <fedor.indutny@gmail.com>2014-03-13 20:56:55 +0400
commitce04c726a31cd13be131915b1c8b8bc7a00a4d24 (patch)
treeb309f6f42362231f54825586b9d79bd6163bb985 /src/node_zlib.cc
parent1c7bf245dc2d520c005e01bcb56ecb3275971395 (diff)
downloadandroid-node-v8-ce04c726a31cd13be131915b1c8b8bc7a00a4d24.tar.gz
android-node-v8-ce04c726a31cd13be131915b1c8b8bc7a00a4d24.tar.bz2
android-node-v8-ce04c726a31cd13be131915b1c8b8bc7a00a4d24.zip
src: update to v8 3.24 APIs
Diffstat (limited to 'src/node_zlib.cc')
-rw-r--r--src/node_zlib.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index db789e2132..81d98d17c9 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -225,14 +225,14 @@ class ZCtx : public AsyncWrap {
static void AfterSync(ZCtx* ctx, const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args.GetIsolate());
HandleScope scope(env->isolate());
- Local<Integer> avail_out = Integer::New(ctx->strm_.avail_out,
- env->isolate());
- Local<Integer> avail_in = Integer::New(ctx->strm_.avail_in,
- env->isolate());
+ Local<Integer> avail_out = Integer::New(env->isolate(),
+ ctx->strm_.avail_out);
+ Local<Integer> avail_in = Integer::New(env->isolate(),
+ ctx->strm_.avail_in);
ctx->write_in_progress_ = false;
- Local<Array> result = Array::New(2);
+ Local<Array> result = Array::New(env->isolate(), 2);
result->Set(0, avail_in);
result->Set(1, avail_out);
args.GetReturnValue().Set(result);
@@ -329,10 +329,10 @@ class ZCtx : public AsyncWrap {
if (!CheckError(ctx))
return;
- Local<Integer> avail_out = Integer::New(ctx->strm_.avail_out,
- env->isolate());
- Local<Integer> avail_in = Integer::New(ctx->strm_.avail_in,
- env->isolate());
+ Local<Integer> avail_out = Integer::New(env->isolate(),
+ ctx->strm_.avail_out);
+ Local<Integer> avail_in = Integer::New(env->isolate(),
+ ctx->strm_.avail_in);
ctx->write_in_progress_ = false;
@@ -358,7 +358,7 @@ class ZCtx : public AsyncWrap {
HandleScope scope(env->isolate());
Local<Value> args[2] = {
OneByteString(env->isolate(), message),
- Number::New(ctx->err_)
+ Number::New(env->isolate(), ctx->err_)
};
ctx->MakeCallback(env->onerror_string(), ARRAY_SIZE(args), args);
@@ -613,7 +613,7 @@ void InitZlib(Handle<Object> target,
Handle<Context> context,
void* priv) {
Environment* env = Environment::GetCurrent(context);
- Local<FunctionTemplate> z = FunctionTemplate::New(ZCtx::New);
+ Local<FunctionTemplate> z = FunctionTemplate::New(env->isolate(), ZCtx::New);
z->InstanceTemplate()->SetInternalFieldCount(1);