Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 297bf79d09d5101bfd255d1b10483999e3644114..431782a3043512567107745e5717a1b342f5f59e 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -443,8 +443,9 @@ Handle<Value> Shell::CreateExternalArray(const Arguments& args, |
void Shell::ExternalArrayWeakCallback(Persistent<Value> object, void* data) { |
HandleScope scope; |
- Local<Value> length = object->ToObject()->Get(String::New("byteLength")); |
- V8::AdjustAmountOfExternalAllocatedMemory(-length->Uint32Value()); |
+ int32_t length = |
+ object->ToObject()->Get(String::New("byteLength"))->Uint32Value(); |
Michael Starzinger
2012/06/01 12:00:10
Hmm, this looks strange, it implicitly casts uint3
rossberg
2012/06/01 12:06:20
It's done in other places, too. It's correct becau
|
+ V8::AdjustAmountOfExternalAllocatedMemory(-length); |
delete[] static_cast<uint8_t*>(data); |
object.Dispose(); |
} |