5 #ifndef INCLUDE_V8_ARRAY_BUFFER_H_
6 #define INCLUDE_V8_ARRAY_BUFFER_H_
20 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT
22 #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2
67 void operator delete(
void* ptr) { ::operator
delete(ptr); }
83 using DeleterCallback =
void (*)(
void* data, size_t length,
95 static void EmptyDeleter(
void* data, size_t length,
void* deleter_data);
105 #if !defined(V8_IMMINENT_DEPRECATION_WARNINGS)
107 using BackingStoreDeleterCallback =
void (*)(
void* data, size_t length,
152 virtual void Free(
void* data, size_t length) = 0;
166 virtual void*
Reallocate(
void* data, size_t old_length, size_t new_length);
235 void* data, size_t byte_length,
v8::
BackingStore::DeleterCallback deleter,
260 #ifdef V8_ENABLE_CHECKS
271 static void CheckCast(
Value* obj);
274 #ifndef V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT
276 #define V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT 2
316 #ifdef V8_ENABLE_CHECKS
329 static void CheckCast(
Value* obj);
338 size_t byte_offset, size_t length);
340 size_t byte_offset, size_t length);
342 #ifdef V8_ENABLE_CHECKS
345 return static_cast<
DataView*>(value);
350 static void CheckCast(
Value* obj);
406 void* data, size_t byte_length,
v8::
BackingStore::DeleterCallback deleter,
418 #ifdef V8_ENABLE_CHECKS
428 static void CheckCast(
Value* obj);