chromium/v8/test/cctest/test-api-array-buffer.cc

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/api/api-inl.h"
#include "src/base/logging.h"
#include "src/base/strings.h"
#include "src/common/globals.h"
#include "src/objects/js-array-buffer-inl.h"
#include "src/sandbox/sandbox.h"
#include "test/cctest/heap/heap-utils.h"
#include "test/cctest/test-api.h"
#include "test/common/flag-utils.h"

Array;
Context;
Local;
Value;

namespace {

void CheckDataViewIsDetached(v8::Local<v8::DataView> dv) {}

void CheckIsDetached(v8::Local<v8::TypedArray> ta) {}

void CheckIsTypedArrayVarDetached(const char* name) {}

template <typename TypedArray, int kElementSize>
Local<TypedArray> CreateAndCheck(Local<v8::ArrayBuffer> ab, int byteOffset,
                                 int length) {}

std::shared_ptr<v8::BackingStore> Externalize(Local<v8::ArrayBuffer> ab) {}

std::shared_ptr<v8::BackingStore> Externalize(Local<v8::SharedArrayBuffer> ab) {}

}  // namespace

THREADED_TEST(ArrayBuffer_ApiInternalToExternal) {}

THREADED_TEST(ArrayBuffer_JSInternalToExternal) {}

THREADED_TEST(ArrayBuffer_DisableDetach) {}

THREADED_TEST(ArrayBuffer_DetachingApi) {}

THREADED_TEST(ArrayBuffer_DetachingScript) {}

THREADED_TEST(ArrayBuffer_WasDetached) {}

THREADED_TEST(ArrayBuffer_NonDetachableWasDetached) {}

THREADED_TEST(ArrayBuffer_ExternalizeEmpty) {}

THREADED_TEST(SharedArrayBuffer_ApiInternalToExternal) {}

THREADED_TEST(SharedArrayBuffer_JSInternalToExternal) {}

THREADED_TEST(SkipArrayBufferBackingStoreDuringGC) {}

THREADED_TEST(SkipArrayBufferDuringScavenge) {}

THREADED_TEST(Regress1006600) {}

THREADED_TEST(ArrayBuffer_NewBackingStore) {}

THREADED_TEST(ArrayBuffer_NewResizableBackingStore) {}

THREADED_TEST(SharedArrayBuffer_NewBackingStore) {}

static void* backing_store_custom_data =;
static size_t backing_store_custom_length =;
static bool backing_store_custom_called =;
const intptr_t backing_store_custom_deleter_data =;

static void BackingStoreCustomDeleter(void* data, size_t length,
                                      void* deleter_data) {}

TEST(ArrayBuffer_NewBackingStore_CustomDeleter) {}

TEST(SharedArrayBuffer_NewBackingStore_CustomDeleter) {}

TEST(ArrayBuffer_NewBackingStore_EmptyDeleter) {}

TEST(SharedArrayBuffer_NewBackingStore_EmptyDeleter) {}

THREADED_TEST(BackingStore_NotShared) {}

THREADED_TEST(BackingStore_Shared) {}

THREADED_TEST(ArrayBuffer_NewBackingStore_NullData) {}

class DummyAllocator final : public v8::ArrayBuffer::Allocator {};

TEST(BackingStore_HoldAllocatorAlive_UntilIsolateShutdown) {}

TEST(BackingStore_HoldAllocatorAlive_AfterIsolateShutdown) {}

class NullptrAllocator final : public v8::ArrayBuffer::Allocator {};

TEST(BackingStore_ReleaseAllocator_NullptrBackingStore) {}

START_ALLOW_USE_DEPRECATED()

TEST(BackingStore_ReallocateExpand) {}

TEST(BackingStore_ReallocateShrink) {}

TEST(BackingStore_ReallocateNotShared) {}

TEST(BackingStore_ReallocateShared) {}

END_ALLOW_USE_DEPRECATED()

TEST(ArrayBuffer_Resizable) {}

TEST(ArrayBuffer_FixedLength) {}

THREADED_TEST(ArrayBuffer_DataApiWithEmptyExternal) {}