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

Side by Side Diff: src/objects.cc

Issue 16562005: Neutering API for v8::ArrayBuffer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Style Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 15676 matching lines...) Expand 10 before | Expand all | Expand 10 after
15687 set_cache_stamp(date_cache->stamp()); 15687 set_cache_stamp(date_cache->stamp());
15688 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 15688 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
15689 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 15689 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
15690 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 15690 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
15691 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 15691 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
15692 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 15692 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
15693 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 15693 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
15694 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 15694 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
15695 } 15695 }
15696 15696
15697
15698 void JSArrayBuffer::Neuter() {
15699 ASSERT(is_external());
15700 set_backing_store(NULL);
15701 set_byte_length(Smi::FromInt(0));
15702 }
15703
15704
15705 void JSTypedArray::Neuter() {
15706 set_byte_offset(Smi::FromInt(0));
15707 set_byte_length(Smi::FromInt(0));
15708 set_length(Smi::FromInt(0));
15709 set_elements(GetHeap()->EmptyExternalArrayForMap(map()));
15710 }
15711
15697 } } // namespace v8::internal 15712 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698