diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/node_buffer.cc | 3 | ||||
-rw-r--r-- | src/node_script.cc | 1 | ||||
-rw-r--r-- | src/v8_typed_array.cc | 5 |
3 files changed, 1 insertions, 8 deletions
diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 1aac8bc3b..14aa3ef61 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -171,11 +171,10 @@ Handle<Value> Buffer::New(const Arguments &args) { HandleScope scope; - Buffer *buffer; if (args[0]->IsInt32()) { // var buffer = new Buffer(1024); size_t length = args[0]->Uint32Value(); - buffer = new Buffer(args.This(), length); + new Buffer(args.This(), length); } else { return ThrowException(Exception::TypeError(String::New("Bad argument"))); } diff --git a/src/node_script.cc b/src/node_script.cc index 1f51113c9..c6db76ea5 100644 --- a/src/node_script.cc +++ b/src/node_script.cc @@ -357,7 +357,6 @@ Handle<Value> WrappedScript::EvalMachine(const Arguments& args) { } else if (context_flag == userContext) { // Use the passed in context - Local<Object> contextArg = args[sandbox_index]->ToObject(); WrappedContext *nContext = ObjectWrap::Unwrap<WrappedContext>(sandbox); context = nContext->GetV8Context(); } diff --git a/src/v8_typed_array.cc b/src/v8_typed_array.cc index 9941845fc..18f1e4204 100644 --- a/src/v8_typed_array.cc +++ b/src/v8_typed_array.cc @@ -345,11 +345,6 @@ class TypedArray { v8::Handle<v8::Object> obj = v8::Handle<v8::Object>::Cast(args[0]); if (TypedArray<TBytes, TEAType>::HasInstance(obj)) { // ArrayBufferView. - v8::Handle<v8::Object> src_buffer = v8::Handle<v8::Object>::Cast( - obj->Get(v8::String::New("buffer"))); - v8::Handle<v8::Object> dst_buffer = v8::Handle<v8::Object>::Cast( - args.This()->Get(v8::String::New("buffer"))); - if (args[1]->Int32Value() < 0) return ThrowRangeError("Offset may not be negative."); |