Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Mar 11, 2011
1 parent 39e4b1f commit 3dc34e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PixelArray.cc
Expand Up @@ -80,7 +80,8 @@ PixelArray::New(const Arguments &args) {

Handle<Value>
PixelArray::GetLength(Local<String> prop, const AccessorInfo &info) {
return Number::New(info.This()->GetIndexedPropertiesPixelDataLength());
HandleScope scope;
return scope.Close(Number::New(info.This()->GetIndexedPropertiesPixelDataLength()));
}

/*
Expand Down Expand Up @@ -133,8 +134,7 @@ PixelArray::PixelArray(int width, int height):
uint8_t *
PixelArray::alloc() {
int len = length();
_data = (uint8_t *) malloc(len);
memset(_data, 0, len);
_data = (uint8_t *) calloc(1, len);
V8::AdjustAmountOfExternalAllocatedMemory(len);
return _data;
}
Expand Down

0 comments on commit 3dc34e4

Please sign in to comment.