Browse Source

Remove unused variables.

v0.9.1-release
Ben Noordhuis 13 years ago
parent
commit
b92a919500
  1. 3
      src/node_buffer.cc
  2. 1
      src/node_script.cc
  3. 5
      src/v8_typed_array.cc

3
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")));
}

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

5
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.");

Loading…
Cancel
Save