Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index c0814a80cb0e184db7cc4e880a697b560bd85a11..ea07582481a4baff42ad7f8e9a24978991a3a2e9 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -16365,13 +16365,15 @@ void JSDate::SetCachedFields(int64_t local_time_ms, DateCache* date_cache) { |
void JSArrayBuffer::Neuter() { |
- DCHECK(is_external()); |
+ CHECK(is_neuterable()); |
+ CHECK(is_external()); |
set_backing_store(NULL); |
set_byte_length(Smi::FromInt(0)); |
} |
void JSArrayBufferView::NeuterView() { |
+ CHECK(JSArrayBuffer::cast(buffer())->is_neuterable()); |
set_byte_offset(Smi::FromInt(0)); |
set_byte_length(Smi::FromInt(0)); |
} |