Browse Source

misc fixes

v1.x
Tj Holowaychuk 14 years ago
parent
commit
3dc34e41e5
  1. 6
      src/PixelArray.cc

6
src/PixelArray.cc

@ -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()));
}
/*
@ -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;
}

Loading…
Cancel
Save