Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 7a01d55148fa768c0eaba8a5a472f3513ef46d6b..297bf79d09d5101bfd255d1b10483999e3644114 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -443,9 +443,8 @@ Handle<Value> Shell::CreateExternalArray(const Arguments& args, |
void Shell::ExternalArrayWeakCallback(Persistent<Value> object, void* data) { |
HandleScope scope; |
- int32_t length = |
- object->ToObject()->Get(String::New("byteLength"))->Uint32Value(); |
- V8::AdjustAmountOfExternalAllocatedMemory(-length); |
+ Local<Value> length = object->ToObject()->Get(String::New("byteLength")); |
+ V8::AdjustAmountOfExternalAllocatedMemory(-length->Uint32Value()); |
delete[] static_cast<uint8_t*>(data); |
object.Dispose(); |
} |
@@ -1020,7 +1019,7 @@ static char* ReadChars(const char* name, int* size_out) { |
Handle<Value> Shell::ReadBuffer(const Arguments& args) { |
- ASSERT(sizeof(char) == sizeof(uint8_t)); // NOLINT |
+ STATIC_ASSERT(sizeof(char) == sizeof(uint8_t)); // NOLINT |
String::Utf8Value filename(args[0]); |
int length; |
if (*filename == NULL) { |