Remove fancy SlowBuffer constructor
authorRyan Dahl <ry@tinyclouds.org>
Wed, 8 Sep 2010 05:52:09 +0000 (22:52 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Thu, 9 Sep 2010 18:03:50 +0000 (11:03 -0700)
src/node_buffer.cc

index a6a6ddf..a4e3671 100644 (file)
@@ -248,26 +248,6 @@ Handle<Value> Buffer::New(const Arguments &args) {
                                                        buffer->length());
   args.This()->Set(length_symbol, Integer::New(buffer->length_));
 
-  if (args[0]->IsString()) {
-    if (write_sym.IsEmpty()) {
-      write_sym = Persistent<String>::New(String::NewSymbol("write"));
-    }
-
-    Local<Value> write_v = args.This()->Get(write_sym);
-    assert(write_v->IsFunction());
-    Local<Function> write = Local<Function>::Cast(write_v);
-
-    Local<Value> argv[2] = { args[0], args[1] };
-
-    TryCatch try_catch;
-
-    write->Call(args.This(), 2, argv);
-
-    if (try_catch.HasCaught()) {
-      FatalException(try_catch);
-    }
-  }
-
   return args.This();
 }