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 10820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10831 | 10831 |
10832 DECLARE_CAST(JSArrayBuffer) | 10832 DECLARE_CAST(JSArrayBuffer) |
10833 | 10833 |
10834 void Neuter(); | 10834 void Neuter(); |
10835 | 10835 |
10836 V8_EXPORT_PRIVATE static void Setup( | 10836 V8_EXPORT_PRIVATE static void Setup( |
10837 Handle<JSArrayBuffer> array_buffer, Isolate* isolate, bool is_external, | 10837 Handle<JSArrayBuffer> array_buffer, Isolate* isolate, bool is_external, |
10838 void* data, size_t allocated_length, | 10838 void* data, size_t allocated_length, |
10839 SharedFlag shared = SharedFlag::kNotShared); | 10839 SharedFlag shared = SharedFlag::kNotShared); |
10840 | 10840 |
10841 static bool SetupAllocatingData(Handle<JSArrayBuffer> array_buffer, | 10841 // Returns false if array buffer contents could not be allocated. |
10842 Isolate* isolate, size_t allocated_length, | 10842 // In this case, |array_buffer| will not be set up. |
10843 bool initialize = true, | 10843 static bool SetupAllocatingData( |
10844 SharedFlag shared = SharedFlag::kNotShared); | 10844 Handle<JSArrayBuffer> array_buffer, Isolate* isolate, |
| 10845 size_t allocated_length, bool initialize = true, |
| 10846 SharedFlag shared = SharedFlag::kNotShared) WARN_UNUSED_RESULT; |
10845 | 10847 |
10846 // Dispatched behavior. | 10848 // Dispatched behavior. |
10847 DECLARE_PRINTER(JSArrayBuffer) | 10849 DECLARE_PRINTER(JSArrayBuffer) |
10848 DECLARE_VERIFIER(JSArrayBuffer) | 10850 DECLARE_VERIFIER(JSArrayBuffer) |
10849 | 10851 |
10850 static const int kByteLengthOffset = JSObject::kHeaderSize; | 10852 static const int kByteLengthOffset = JSObject::kHeaderSize; |
10851 static const int kBackingStoreOffset = kByteLengthOffset + kPointerSize; | 10853 static const int kBackingStoreOffset = kByteLengthOffset + kPointerSize; |
10852 static const int kBitFieldSlot = kBackingStoreOffset + kPointerSize; | 10854 static const int kBitFieldSlot = kBackingStoreOffset + kPointerSize; |
10853 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT | 10855 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT |
10854 static const int kBitFieldOffset = kBitFieldSlot; | 10856 static const int kBitFieldOffset = kBitFieldSlot; |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11687 } | 11689 } |
11688 }; | 11690 }; |
11689 | 11691 |
11690 | 11692 |
11691 } // NOLINT, false-positive due to second-order macros. | 11693 } // NOLINT, false-positive due to second-order macros. |
11692 } // NOLINT, false-positive due to second-order macros. | 11694 } // NOLINT, false-positive due to second-order macros. |
11693 | 11695 |
11694 #include "src/objects/object-macros-undef.h" | 11696 #include "src/objects/object-macros-undef.h" |
11695 | 11697 |
11696 #endif // V8_OBJECTS_H_ | 11698 #endif // V8_OBJECTS_H_ |
OLD | NEW |