OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 10916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10927 | 10927 |
10928 inline bool is_neuterable(); | 10928 inline bool is_neuterable(); |
10929 inline void set_is_neuterable(bool value); | 10929 inline void set_is_neuterable(bool value); |
10930 | 10930 |
10931 inline bool was_neutered(); | 10931 inline bool was_neutered(); |
10932 inline void set_was_neutered(bool value); | 10932 inline void set_was_neutered(bool value); |
10933 | 10933 |
10934 inline bool is_shared(); | 10934 inline bool is_shared(); |
10935 inline void set_is_shared(bool value); | 10935 inline void set_is_shared(bool value); |
10936 | 10936 |
| 10937 inline bool has_guard_region(); |
| 10938 inline void set_has_guard_region(bool value); |
| 10939 |
10937 DECLARE_CAST(JSArrayBuffer) | 10940 DECLARE_CAST(JSArrayBuffer) |
10938 | 10941 |
10939 void Neuter(); | 10942 void Neuter(); |
10940 | 10943 |
10941 V8_EXPORT_PRIVATE static void Setup( | 10944 V8_EXPORT_PRIVATE static void Setup( |
10942 Handle<JSArrayBuffer> array_buffer, Isolate* isolate, bool is_external, | 10945 Handle<JSArrayBuffer> array_buffer, Isolate* isolate, bool is_external, |
10943 void* data, size_t allocated_length, | 10946 void* data, size_t allocated_length, |
10944 SharedFlag shared = SharedFlag::kNotShared); | 10947 SharedFlag shared = SharedFlag::kNotShared); |
10945 | 10948 |
10946 static bool SetupAllocatingData(Handle<JSArrayBuffer> array_buffer, | 10949 static bool SetupAllocatingData(Handle<JSArrayBuffer> array_buffer, |
(...skipping 19 matching lines...) Expand all Loading... |
10966 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; | 10969 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; |
10967 | 10970 |
10968 // Iterates all fields in the object including internal ones except | 10971 // Iterates all fields in the object including internal ones except |
10969 // kBackingStoreOffset and kBitFieldSlot. | 10972 // kBackingStoreOffset and kBitFieldSlot. |
10970 class BodyDescriptor; | 10973 class BodyDescriptor; |
10971 | 10974 |
10972 class IsExternal : public BitField<bool, 1, 1> {}; | 10975 class IsExternal : public BitField<bool, 1, 1> {}; |
10973 class IsNeuterable : public BitField<bool, 2, 1> {}; | 10976 class IsNeuterable : public BitField<bool, 2, 1> {}; |
10974 class WasNeutered : public BitField<bool, 3, 1> {}; | 10977 class WasNeutered : public BitField<bool, 3, 1> {}; |
10975 class IsShared : public BitField<bool, 4, 1> {}; | 10978 class IsShared : public BitField<bool, 4, 1> {}; |
| 10979 class HasGuardRegion : public BitField<bool, 5, 1> {}; |
10976 | 10980 |
10977 private: | 10981 private: |
10978 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); | 10982 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); |
10979 }; | 10983 }; |
10980 | 10984 |
10981 | 10985 |
10982 class JSArrayBufferView: public JSObject { | 10986 class JSArrayBufferView: public JSObject { |
10983 public: | 10987 public: |
10984 // [buffer]: ArrayBuffer that this typed array views. | 10988 // [buffer]: ArrayBuffer that this typed array views. |
10985 DECL_ACCESSORS(buffer, Object) | 10989 DECL_ACCESSORS(buffer, Object) |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11784 } | 11788 } |
11785 return value; | 11789 return value; |
11786 } | 11790 } |
11787 }; | 11791 }; |
11788 | 11792 |
11789 | 11793 |
11790 } // NOLINT, false-positive due to second-order macros. | 11794 } // NOLINT, false-positive due to second-order macros. |
11791 } // NOLINT, false-positive due to second-order macros. | 11795 } // NOLINT, false-positive due to second-order macros. |
11792 | 11796 |
11793 #endif // V8_OBJECTS_H_ | 11797 #endif // V8_OBJECTS_H_ |
OLD | NEW |