18 FLAG_trace_handles =
true;
22 const int kNumHandles = 65;
24 for (
int i = 0;
i < kNumHandles;
i++) {
27 EXPECT_EQ(
i, handle.
Value());
31 for (
int i = kNumHandles;
i < (2 * kNumHandles);
i++) {
34 EXPECT_EQ(
i, handle.
Value());
42 FLAG_trace_handles =
true;
45 const int kNumHandles = 65;
50 for (
int i = 0;
i < kNumHandles;
i++) {
53 EXPECT_EQ(
i, handle.
Value());
57 for (
int loop = 0; loop < 1000; loop++) {
59 for (
int i = 0;
i < 2;
i++) {
62 EXPECT_EQ(
i + loop, handle.
Value());
64 EXPECT_EQ((handle_count + kNumHandles + 2),
68 for (
int i = 0;
i < kNumHandles;
i++) {
71 EXPECT_EQ(
i, handle.
Value());
73 EXPECT_EQ((handle_count + (2 * kNumHandles)),
79static void NoopCallback(
void* isolate_callback_data,
void* peer) {}
84 FLAG_trace_handles =
true;
132 EXPECT_NOTNULL(handle);
static Dart_Handle NewHandle(Thread *thread, ObjectPtr raw)
static bool IsValid(Dart_Handle handle)
static Object & ZoneHandle()
static SmiPtr New(intptr_t value)
static Thread * Current()
static int ZoneHandleCount()
static int ScopedHandleCount()
struct _Dart_Handle * Dart_Handle
Dart_Handle Dart_PersistentHandle
struct _Dart_WeakPersistentHandle * Dart_WeakPersistentHandle
#define HANDLESCOPE(thread)
DART_EXPORT Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle(Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
DART_EXPORT void Dart_EnterScope()
DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object)
DART_EXPORT void Dart_DeleteWeakPersistentHandle(Dart_WeakPersistentHandle object)
ISOLATE_UNIT_TEST_CASE(StackAllocatedDestruction)
TEST_CASE(DirectoryCurrent)
static void NoopCallback(void *isolate_callback_data, void *peer)
DART_EXPORT void Dart_ExitScope()
DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char *str)
DART_EXPORT Dart_PersistentHandle Dart_NewPersistentHandle(Dart_Handle object)
#define EXPECT_VALID(handle)