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

Side by Side Diff: src/objects.h

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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 8777 matching lines...) Expand 10 before | Expand all | Expand 10 after
8788 8788
8789 // [weak_next]: linked list of array buffers. 8789 // [weak_next]: linked list of array buffers.
8790 DECL_ACCESSORS(weak_next, Object) 8790 DECL_ACCESSORS(weak_next, Object)
8791 8791
8792 // [weak_first_array]: weak linked list of typed arrays. 8792 // [weak_first_array]: weak linked list of typed arrays.
8793 DECL_ACCESSORS(weak_first_array, Object) 8793 DECL_ACCESSORS(weak_first_array, Object)
8794 8794
8795 // Casting. 8795 // Casting.
8796 static inline JSArrayBuffer* cast(Object* obj); 8796 static inline JSArrayBuffer* cast(Object* obj);
8797 8797
8798 // Neutering. Only neuters the buffer, not associated typed arrays.
8799 void Neuter();
8800
8798 // Dispatched behavior. 8801 // Dispatched behavior.
8799 DECLARE_PRINTER(JSArrayBuffer) 8802 DECLARE_PRINTER(JSArrayBuffer)
8800 DECLARE_VERIFIER(JSArrayBuffer) 8803 DECLARE_VERIFIER(JSArrayBuffer)
8801 8804
8802 static const int kBackingStoreOffset = JSObject::kHeaderSize; 8805 static const int kBackingStoreOffset = JSObject::kHeaderSize;
8803 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; 8806 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
8804 static const int kFlagOffset = kByteLengthOffset + kPointerSize; 8807 static const int kFlagOffset = kByteLengthOffset + kPointerSize;
8805 static const int kWeakNextOffset = kFlagOffset + kPointerSize; 8808 static const int kWeakNextOffset = kFlagOffset + kPointerSize;
8806 static const int kWeakFirstArrayOffset = kWeakNextOffset + kPointerSize; 8809 static const int kWeakFirstArrayOffset = kWeakNextOffset + kPointerSize;
8807 static const int kSize = kWeakFirstArrayOffset + kPointerSize; 8810 static const int kSize = kWeakFirstArrayOffset + kPointerSize;
(...skipping 19 matching lines...) Expand all
8827 8830
8828 // [byte_length]: length of typed array in bytes. 8831 // [byte_length]: length of typed array in bytes.
8829 DECL_ACCESSORS(byte_length, Object) 8832 DECL_ACCESSORS(byte_length, Object)
8830 8833
8831 // [length]: length of typed array in elements. 8834 // [length]: length of typed array in elements.
8832 DECL_ACCESSORS(length, Object) 8835 DECL_ACCESSORS(length, Object)
8833 8836
8834 // [weak_next]: linked list of typed arrays over the same array buffer. 8837 // [weak_next]: linked list of typed arrays over the same array buffer.
8835 DECL_ACCESSORS(weak_next, Object) 8838 DECL_ACCESSORS(weak_next, Object)
8836 8839
8840 // Neutering. Only neuters this typed array.
8841 void Neuter();
8842
8837 // Casting. 8843 // Casting.
8838 static inline JSTypedArray* cast(Object* obj); 8844 static inline JSTypedArray* cast(Object* obj);
8839 8845
8840 ExternalArrayType type(); 8846 ExternalArrayType type();
8841 size_t element_size(); 8847 size_t element_size();
8842 8848
8843 // Dispatched behavior. 8849 // Dispatched behavior.
8844 DECLARE_PRINTER(JSTypedArray) 8850 DECLARE_PRINTER(JSTypedArray)
8845 DECLARE_VERIFIER(JSTypedArray) 8851 DECLARE_VERIFIER(JSTypedArray)
8846 8852
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
9657 } else { 9663 } else {
9658 value &= ~(1 << bit_position); 9664 value &= ~(1 << bit_position);
9659 } 9665 }
9660 return value; 9666 return value;
9661 } 9667 }
9662 }; 9668 };
9663 9669
9664 } } // namespace v8::internal 9670 } } // namespace v8::internal
9665 9671
9666 #endif // V8_OBJECTS_H_ 9672 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/objects.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698