Remove fancy SlowBuffer constructor

pull/22966/head
Ryan Dahl 2010-09-07 22:52:09 -07:00
parent ba2e4a2306
commit 71d67dbf48
1 changed files with 0 additions and 20 deletions

View 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();
}