Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: src/objects.cc

Issue 684103002: allow disabling of ArrayBuffer neutering (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« include/v8.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index c0814a80cb0e184db7cc4e880a697b560bd85a11..a049fb9e9650ff7bde5b90a4b08f16f5d470290a 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -16365,6 +16365,7 @@ void JSDate::SetCachedFields(int64_t local_time_ms, DateCache* date_cache) {
void JSArrayBuffer::Neuter() {
+ DCHECK(is_neuterable());
Dmitry Lomov (no reviews) 2014/10/29 10:15:38 Change to CHECK - this should fail in release as w
DCHECK(is_external());
set_backing_store(NULL);
set_byte_length(Smi::FromInt(0));
@@ -16372,6 +16373,7 @@ void JSArrayBuffer::Neuter() {
void JSArrayBufferView::NeuterView() {
+ DCHECK(JSArrayBuffer::cast(buffer())->is_neuterable());
Dmitry Lomov (no reviews) 2014/10/29 10:15:38 Change to CHECK - this should fail in release as w
set_byte_offset(Smi::FromInt(0));
set_byte_length(Smi::FromInt(0));
}
« include/v8.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698