#include "include/v8-context.h"
#include "include/v8-function.h"
#include "include/v8-isolate.h"
#include "include/v8-local-handle.h"
#include "include/v8-object.h"
#include "include/v8-template.h"
#include "src/api/api-inl.h"
#include "src/debug/debug.h"
#include "src/execution/isolate.h"
#include "src/objects/objects-inl.h"
#include "test/unittests/test-utils.h"
#include "testing/gmock-support.h"
#include "testing/gtest/include/gtest/gtest.h"
i;
IsInt32;
IsString;
IsUndefined;
using AccessorTest = v8::TestWithContext;
static void UnreachableCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) { … }
TEST_F(AccessorTest, CachedAccessor) { … }
TEST_F(AccessorTest, CachedAccessorTurboFan) { … }
TEST_F(AccessorTest, CachedAccessorOnGlobalObject) { … }
namespace {
void Getter(v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
void StringGetter(v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
int set_accessor_call_count = …;
void Setter(v8::Local<v8::Name> name, v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info) { … }
void EmptyCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { … }
}
TEST_F(AccessorTest, RedeclareAccessor) { … }
class NoopDelegate : public v8::debug::DebugDelegate { … };
static void CheckSideEffectFreeAccesses(v8::Isolate* isolate,
v8::Local<v8::String> call_getter,
v8::Local<v8::String> call_setter) { … }
TEST_F(AccessorTest, AccessorsWithSideEffects) { … }
TEST_F(AccessorTest, TemplateAccessorsWithSideEffects) { … }
TEST_F(AccessorTest, NativeTemplateAccessorWithSideEffects) { … }
TEST_F(AccessorTest, NativeAccessorsWithSideEffects) { … }
TEST_F(AccessorTest, AccessorSetHasNoSideEffect) { … }
TEST_F(AccessorTest, SetNativeDataPropertySetSideEffectReceiverCheck1) { … }
static void ConstructCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { … }
TEST_F(AccessorTest, SetNativeDataPropertySetSideEffectReceiverCheck2) { … }
TEST_F(AccessorTest, AccessorSetNativeDataPropertyHasNoSideEffect) { … }
TEST_F(AccessorTest, AccessorSetLazyDataPropertyHasNoSideEffect) { … }
TEST_F(AccessorTest, ObjectTemplateSetNativeDataPropertyHasNoSideEffect) { … }
TEST_F(AccessorTest, ObjectTemplateSetNativePropertyHasNoSideEffect) { … }
TEST_F(AccessorTest, ObjectTemplateSetLazyPropertyHasNoSideEffect) { … }
namespace {
void FunctionNativeGetter(v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info) { … }
}
TEST_F(AccessorTest, BindFunctionTemplateSetNativeDataProperty) { … }
namespace {
v8::MaybeLocal<v8::Context> TestHostCreateShadowRealmContextCallback(
v8::Local<v8::Context> initiator_context) { … }
}
TEST_F(AccessorTest, WrapFunctionTemplateSetNativeDataProperty) { … }