From: Ryan Dahl Date: Wed, 8 Sep 2010 05:52:09 +0000 (-0700) Subject: Remove fancy SlowBuffer constructor X-Git-Tag: v0.3.0~205^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71d67dbf48050c1f459946e978c431ff979ff1a5;p=platform%2Fupstream%2Fnodejs.git Remove fancy SlowBuffer constructor --- diff --git a/src/node_buffer.cc b/src/node_buffer.cc index a6a6ddf..a4e3671 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(); }