Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 0cd965f44794b8258f7764dbee2cc0221e3e2263..e95240ae8407e26bdb3ff927c4550bd11f6cf86f 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -1062,14 +1062,14 @@ Handle<Value> Shell::ArraySet(const Arguments& args) { |
void Shell::ExternalArrayWeakCallback(v8::Isolate* isolate, |
- Persistent<Value> object, |
- void* data) { |
+ Persistent<Object>* object, |
+ uint8_t* data) { |
HandleScope scope(isolate); |
- int32_t length = object->ToObject()->Get( |
+ int32_t length = (*object)->Get( |
PerIsolateData::byteLength_string(isolate))->Uint32Value(); |
isolate->AdjustAmountOfExternalAllocatedMemory(-length); |
- delete[] static_cast<uint8_t*>(data); |
- object.Dispose(isolate); |
+ delete[] data; |
+ object->Dispose(isolate); |
} |