From 71d67dbf48050c1f459946e978c431ff979ff1a5 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 7 Sep 2010 22:52:09 -0700 Subject: [PATCH] Remove fancy SlowBuffer constructor --- src/node_buffer.cc | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/node_buffer.cc b/src/node_buffer.cc index a6a6ddf0d99..a4e36714a8f 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -248,26 +248,6 @@ Handle 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::New(String::NewSymbol("write")); - } - - Local write_v = args.This()->Get(write_sym); - assert(write_v->IsFunction()); - Local write = Local::Cast(write_v); - - Local 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(); }