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

Side by Side 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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 16347 matching lines...) Expand 10 before | Expand all | Expand 10 after
16358 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 16358 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
16359 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 16359 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
16360 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 16360 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
16361 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 16361 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
16362 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 16362 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
16363 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 16363 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
16364 } 16364 }
16365 16365
16366 16366
16367 void JSArrayBuffer::Neuter() { 16367 void JSArrayBuffer::Neuter() {
16368 DCHECK(is_external()); 16368 CHECK(is_neuterable());
16369 CHECK(is_external());
16369 set_backing_store(NULL); 16370 set_backing_store(NULL);
16370 set_byte_length(Smi::FromInt(0)); 16371 set_byte_length(Smi::FromInt(0));
16371 } 16372 }
16372 16373
16373 16374
16374 void JSArrayBufferView::NeuterView() { 16375 void JSArrayBufferView::NeuterView() {
16376 CHECK(JSArrayBuffer::cast(buffer())->is_neuterable());
16375 set_byte_offset(Smi::FromInt(0)); 16377 set_byte_offset(Smi::FromInt(0));
16376 set_byte_length(Smi::FromInt(0)); 16378 set_byte_length(Smi::FromInt(0));
16377 } 16379 }
16378 16380
16379 16381
16380 void JSDataView::Neuter() { 16382 void JSDataView::Neuter() {
16381 NeuterView(); 16383 NeuterView();
16382 } 16384 }
16383 16385
16384 16386
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
16495 Handle<DependentCode> codes = 16497 Handle<DependentCode> codes =
16496 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16498 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16497 DependentCode::kPropertyCellChangedGroup, 16499 DependentCode::kPropertyCellChangedGroup,
16498 info->object_wrapper()); 16500 info->object_wrapper());
16499 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16501 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16500 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16502 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16501 cell, info->zone()); 16503 cell, info->zone());
16502 } 16504 }
16503 16505
16504 } } // namespace v8::internal 16506 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698