summaryrefslogtreecommitdiff
path: root/src/node_io_watcher.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-11-18 11:18:07 -0800
committerRyan Dahl <ry@tinyclouds.org>2010-11-18 16:47:38 -0800
commit3884b4185a72d63ee0344d16390eea852e8b1f89 (patch)
tree0b79b5869e8d0e1712980bce99d53336700b0281 /src/node_io_watcher.cc
parent02039c9b53811cbce3b324c655f9bdfc7504813f (diff)
downloadnode-3884b4185a72d63ee0344d16390eea852e8b1f89.tar.gz
Small clean ups
Diffstat (limited to 'src/node_io_watcher.cc')
-rw-r--r--src/node_io_watcher.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node_io_watcher.cc b/src/node_io_watcher.cc
index 45bc424ee..71a640cb0 100644
--- a/src/node_io_watcher.cc
+++ b/src/node_io_watcher.cc
@@ -344,12 +344,11 @@ void IOWatcher::Dump() {
// TODO: insert v8::String::Pointers() hack here.
Local<String> s = data_v->ToString();
Local<Value> e = bucket->Get(encoding_sym);
- buf_object = Local<Object>::New(Buffer::New(s, e));
+ buf_object = Buffer::New(s, e);
bucket->Set(data_sym, buf_object);
- } else if (Buffer::HasInstance(data_v)) {
- buf_object = data_v->ToObject();
} else {
- assert(0);
+ assert(Buffer::HasInstance(data_v));
+ buf_object = data_v->ToObject();
}
size_t l = Buffer::Length(buf_object);