summaryrefslogtreecommitdiff
path: root/src/tty_wrap.cc
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2013-03-19 14:55:05 -0700
committerBen Noordhuis <info@bnoordhuis.nl>2013-03-20 01:11:02 +0100
commitf65e14ed1daa20a6d2aae08556b2a059f5d90599 (patch)
tree58d433ccbb58dbbb09b9700176e422c88685f287 /src/tty_wrap.cc
parentda4d79ac47c1ad5923b26fd78c385deeb82d9370 (diff)
downloadandroid-node-v8-f65e14ed1daa20a6d2aae08556b2a059f5d90599.tar.gz
android-node-v8-f65e14ed1daa20a6d2aae08556b2a059f5d90599.tar.bz2
android-node-v8-f65e14ed1daa20a6d2aae08556b2a059f5d90599.zip
src: pass Isolate to all applicable api
Update the api to pass node_isolate to all supported methods. Much thanks to Ben Noordhuis and his work in 51f6e6a.
Diffstat (limited to 'src/tty_wrap.cc')
-rw-r--r--src/tty_wrap.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc
index 5ad6106c09..080e53b446 100644
--- a/src/tty_wrap.cc
+++ b/src/tty_wrap.cc
@@ -48,7 +48,7 @@ using v8::Value;
void TTYWrap::Initialize(Handle<Object> target) {
StreamWrap::Initialize(target);
- HandleScope scope;
+ HandleScope scope(node_isolate);
Local<FunctionTemplate> t = FunctionTemplate::New(New);
t->SetClassName(String::NewSymbol("TTY"));
@@ -98,7 +98,7 @@ uv_tty_t* TTYWrap::UVHandle() {
Handle<Value> TTYWrap::GuessHandleType(const Arguments& args) {
- HandleScope scope;
+ HandleScope scope(node_isolate);
int fd = args[0]->Int32Value();
assert(fd >= 0);
@@ -119,26 +119,26 @@ Handle<Value> TTYWrap::GuessHandleType(const Arguments& args) {
default:
assert(0);
- return v8::Undefined();
+ return v8::Undefined(node_isolate);
}
}
Handle<Value> TTYWrap::IsTTY(const Arguments& args) {
- HandleScope scope;
+ HandleScope scope(node_isolate);
int fd = args[0]->Int32Value();
assert(fd >= 0);
if (uv_guess_handle(fd) == UV_TTY) {
- return v8::True();
+ return v8::True(node_isolate);
}
- return v8::False();
+ return v8::False(node_isolate);
}
Handle<Value> TTYWrap::GetWindowSize(const Arguments& args) {
- HandleScope scope;
+ HandleScope scope(node_isolate);
UNWRAP(TTYWrap)
@@ -147,19 +147,19 @@ Handle<Value> TTYWrap::GetWindowSize(const Arguments& args) {
if (r) {
SetErrno(uv_last_error(uv_default_loop()));
- return v8::Undefined();
+ return v8::Undefined(node_isolate);
}
Local<v8::Array> a = v8::Array::New(2);
- a->Set(0, Integer::New(width));
- a->Set(1, Integer::New(height));
+ a->Set(0, Integer::New(width, node_isolate));
+ a->Set(1, Integer::New(height, node_isolate));
return scope.Close(a);
}
Handle<Value> TTYWrap::SetRawMode(const Arguments& args) {
- HandleScope scope;
+ HandleScope scope(node_isolate);
UNWRAP(TTYWrap)
@@ -169,12 +169,12 @@ Handle<Value> TTYWrap::SetRawMode(const Arguments& args) {
SetErrno(uv_last_error(uv_default_loop()));
}
- return scope.Close(Integer::New(r));
+ return scope.Close(Integer::New(r, node_isolate));
}
Handle<Value> TTYWrap::New(const Arguments& args) {
- HandleScope scope;
+ HandleScope scope(node_isolate);
// This constructor should not be exposed to public javascript.
// Therefore we assert that we are not trying to call this as a