17#if defined(DART_HOST_OS_WINDOWS)
25#include <condition_variable>
48 fprintf(stderr, "%s\n", "Check failed: " #X); \
52#define CHECK_EQ(X, Y) CHECK((X) == (Y))
56 fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, "Check failed: " #X); \
65 reinterpret_cast<void*
>(1));
66 return 0x8000000000000000;
71 reinterpret_cast<void*
>(1));
77 reinterpret_cast<void*
>(1));
78 return 0x80000000 * -1.0;
85 reinterpret_cast<void*
>(1));
86 uint64_t origin = 0x8100000082000000;
87 return reinterpret_cast<void*
>(origin);
96 reinterpret_cast<void*
>(num_allocations));
122#if !defined(DART_HOST_OS_WINDOWS)
124 std::condition_variable* var,
158 std::unique_lock<std::mutex> lock(
state->mutex);
163 state->cvar.wait(lock);
192#if defined(DART_TARGET_OS_WINDOWS) && \
193 (defined(HOST_ARCH_IA32) || defined(HOST_ARCH_ARM) || \
194 defined(HOST_ARCH_ARM64))
212#if defined(DART_TARGET_OS_LINUX)
214thread_local sigjmp_buf buf;
215void CallbackTestSignalHandler(
int) {
219intptr_t ExpectAbort(
void (*fn)()) {
220 fprintf(stderr,
"**** EXPECT STACKTRACE TO FOLLOW. THIS IS OK. ****\n");
222 struct sigaction old_action = {};
223 intptr_t
result = sigsetjmp(buf, 1);
226 struct sigaction handler = {};
227 handler.sa_handler = CallbackTestSignalHandler;
228 sigemptyset(&handler.sa_mask);
229 handler.sa_flags = 0;
231 sigaction(SIGABRT, &handler, &old_action);
236 sigaction(SIGABRT, &old_action,
nullptr);
239 fprintf(stderr,
"Expected abort!!!\n");
243void* TestCallbackOnThreadOutsideIsolate(
void* parameter) {
244 CallbackTestData*
data =
reinterpret_cast<CallbackTestData*
>(parameter);
245 data->success = ExpectAbort(
data->callback);
249intptr_t TestCallbackOtherThreadHelper(
void* (*
tester)(
void*),
void (*fn)()) {
250 CallbackTestData
data = {1, fn};
252 intptr_t
result = pthread_attr_init(&attr);
259 result = pthread_attr_destroy(&attr);
263 result = pthread_join(tid, &retval);
271DART_EXPORT intptr_t TestCallbackWrongThread(
void (*fn)()) {
272 return TestCallbackOtherThreadHelper(&TestCallbackOnThreadOutsideIsolate, fn);
277DART_EXPORT intptr_t TestCallbackOutsideIsolate(
void (*fn)()) {
281 CallbackTestData
data = {1, fn};
282 TestCallbackOnThreadOutsideIsolate(&
data);
288DART_EXPORT intptr_t TestCallbackWrongIsolate(
void (*fn)()) {
289 return ExpectAbort(fn);
292DART_EXPORT intptr_t TestCallbackLeaf(
void (*fn)()) {
296 return ExpectAbort(fn);
304void CallDebugName() {
308DART_EXPORT intptr_t TestLeafCallApi(
void (*fn)()) {
314 return ExpectAbort(&CallDebugName);
328#if defined(DART_HOST_OS_MACOS)
329 signal(SIGPIPE, SIG_DFL);
339 static void ShutdownCallback(
void* ig_data,
void* isolate_data) {
340 char*
string =
reinterpret_cast<char*
>(isolate_data);
344 static void CleanupCallback(
void* ig_data,
void* isolate_data) {
345 char*
string =
reinterpret_cast<char*
>(isolate_data);
354 char*
error =
nullptr;
357 &Helper::CleanupCallback, peer, &
error);
358 if (child ==
nullptr) {
371 int64_t main_isolate_port,
372 const char* library_uri,
374 bool errors_are_fatal,
401 fprintf(stderr,
"Failed to invoke %s/%s in child isolate: %s\n",
409 char*
error =
nullptr;
435#define FATAL(error) Fatal(__FILE__, __LINE__, error)
438#if defined(DART_HOST_OS_WINDOWS)
439 Sleep(1000 * seconds);
459 const intptr_t work_addr =
reinterpret_cast<intptr_t
>(work);
460 printf(
"C : Posting message (port: %" Px64 ", work: %" Px ").\n",
461 send_port, work_addr);
467 const bool result = Dart_PostCObject_DL(send_port, &dart_object);
469 FATAL(
"C : Posting message to port failed.");
478 std::unique_lock<std::mutex> lock(mutex);
481 std::condition_variable cv;
482 bool notified =
false;
485 printf(
"C Da: Notify result ready.\n");
486 std::unique_lock<std::mutex> lock(mutex);
490 const Work* work_ptr =
new Work(work);
492 printf(
"C : Waiting for result.\n");
496 printf(
"C : Received result.\n");
507 const Work* work_ptr =
new Work(work);
515 printf(
"C T1: Work1 Start.\n");
517 const intptr_t val1 = 3;
518 printf(
"C T1: MyCallbackBlocking(%" Pd ").\n", val1);
520 printf(
"C T1: MyCallbackBlocking returned %" Pd ".\n", val2);
522 const intptr_t val3 = val2 - 1;
523 printf(
"C T1: MyCallbackNonBlocking(%" Pd ").\n", val3);
525 printf(
"C T1: Work1 Done.\n");
532 printf(
"C T2: Work2 Start.\n");
533 const intptr_t val1 = 5;
534 printf(
"C T2: MyCallbackNonBlocking(%" Pd ").\n", val1);
536 const intptr_t val2 = 1;
537 printf(
"C T2: MyCallbackBlocking(%" Pd ").\n", val2);
539 printf(
"C T2: MyCallbackBlocking returned %" Pd ".\n", val3);
540 printf(
"C T2: MyCallbackNonBlocking(%" Pd ").\n", val3);
542 printf(
"C T2: Work2 Done.\n");
550 running_work_simulator_->Start();
554 running_work_simulator_->Stop();
555 delete running_work_simulator_;
556 running_work_simulator_ =
nullptr;
563 printf(
"C Da: Starting SimulateWork.\n");
564 printf(
"C Da: Starting worker threads.\n");
565 thread1 =
new std::thread(
Work1);
566 thread2 =
new std::thread(
Work2);
567 printf(
"C Da: Started SimulateWork.\n");
571 printf(
"C Da: Stopping SimulateWork.\n");
572 printf(
"C Da: Waiting for worker threads to finish.\n");
577 printf(
"C Da: Stopped SimulateWork.\n");
580 std::thread* thread1;
581 std::thread* thread2;
583SimulateWork* SimulateWork::running_work_simulator_ = 0;
586 intptr_t (*callback1)(intptr_t)) {
606 printf(
"C Da: ExecuteCallback(%" Pp ").\n",
607 reinterpret_cast<intptr_t
>(work_ptr));
608 const Work work = *work_ptr;
611 printf(
"C Da: ExecuteCallback done.\n");
642 std::unique_lock<std::mutex> lock(mutex);
643 const bool success = Dart_PostCObject_DL(
port,
object);
644 if (!success)
FATAL(
"Failed to send message, invalid port or isolate died");
646 printf(
"C : Waiting for result.\n");
654 FATAL(
"C : Wrong Data: message->type != Dart_CObject_kArray.\n");
659 printf(
"C : HandleResponse (call: %" Px ", message: %" Px ").\n",
660 reinterpret_cast<intptr_t
>(c_pending_call),
661 reinterpret_cast<intptr_t
>(c_message));
663 auto pending_call =
reinterpret_cast<PendingCall*
>(
668 pending_call->ResolveCall(c_message);
672 static bool NonEmptyBuffer(
void**
value) {
return *
value !=
nullptr; }
677 FATAL(
"C : Wrong Data: bytes->type != Dart_CObject_kTypedData.\n");
681 printf(
"C : ResolveCall(length: %" Pd ", buffer: %" Px ").\n",
682 response_length,
reinterpret_cast<intptr_t
>(response_buffer));
685 memmove(
buffer, response_buffer, response_length);
687 *response_buffer_ =
buffer;
688 *response_length_ = response_length;
690 printf(
"C : Notify result ready.\n");
691 std::unique_lock<std::mutex> lock(mutex);
697 std::condition_variable cv;
698 bool notified =
false;
701 void** response_buffer_;
702 size_t* response_length_;
709 const char* methodname =
"myCallback1";
710 size_t request_length =
sizeof(uint8_t) * 1;
711 void* request_buffer =
malloc(request_length);
712 reinterpret_cast<uint8_t*
>(request_buffer)[0] =
a;
713 void* response_buffer =
nullptr;
714 size_t response_length = 0;
716 PendingCall pending_call(&response_buffer, &response_length);
725 c_pending_call.
value.
as_int64 =
reinterpret_cast<int64_t
>(&pending_call);
736 static_cast<uint8_t*
>(request_buffer);
740 Dart_CObject* c_request_arr[] = {&c_send_port, &c_pending_call,
741 &c_method_name, &c_request_data};
746 sizeof(c_request_arr) /
sizeof(c_request_arr[0]);
748 printf(
"C : Dart_PostCObject_(request: %" Px ", call: %" Px ").\n",
749 reinterpret_cast<intptr_t
>(&c_request),
750 reinterpret_cast<intptr_t
>(&c_pending_call));
752 printf(
"C : Received result.\n");
754 const intptr_t
result =
reinterpret_cast<uint8_t*
>(response_buffer)[0];
755 free(response_buffer);
764 const char* methodname =
"myCallback2";
765 void* request_buffer =
malloc(
sizeof(uint8_t) * 1);
766 reinterpret_cast<uint8_t*
>(request_buffer)[0] =
a;
767 const size_t request_length =
sizeof(uint8_t) * 1;
784 static_cast<uint8_t*
>(request_buffer);
788 Dart_CObject* c_request_arr[] = {&c_send_port, &c_pending_call,
789 &c_method_name, &c_request_data};
794 sizeof(c_request_arr) /
sizeof(c_request_arr[0]);
796 printf(
"C : Dart_PostCObject_(request: %" Px ", call: %" Px ").\n",
797 reinterpret_cast<intptr_t
>(&c_request),
798 reinterpret_cast<intptr_t
>(&c_pending_call));
806 printf(
"C T1: Work1 Start.\n");
808 const intptr_t val1 = 3;
809 printf(
"C T1: MyCallback1(%" Pd ").\n", val1);
811 printf(
"C T1: MyCallback1 returned %" Pd ".\n", val2);
813 const intptr_t val3 = val2 - 1;
814 printf(
"C T1: MyCallback2(%" Pd ").\n", val3);
816 printf(
"C T1: Work1 Done.\n");
823 printf(
"C T2: Work2 Start.\n");
824 const intptr_t val1 = 5;
825 printf(
"C T2: MyCallback2(%" Pd ").\n", val1);
827 const intptr_t val2 = 1;
828 printf(
"C T2: MyCallback1(%" Pd ").\n", val2);
830 printf(
"C T2: MyCallback1 returned %" Pd ".\n", val3);
831 printf(
"C T2: MyCallback2(%" Pd ").\n", val3);
833 printf(
"C T2: Work2 Done.\n");
841 running_work_simulator_->Start();
845 running_work_simulator_->Stop();
846 delete running_work_simulator_;
847 running_work_simulator_ =
nullptr;
854 printf(
"C Da: Starting SimulateWork.\n");
855 printf(
"C Da: Starting worker threads.\n");
856 thread1 =
new std::thread(
Work1_2);
857 thread2 =
new std::thread(
Work2_2);
858 printf(
"C Da: Started SimulateWork.\n");
862 printf(
"C Da: Stopping SimulateWork.\n");
863 printf(
"C Da: Waiting for worker threads to finish.\n");
868 printf(
"C Da: Stopped SimulateWork.\n");
871 std::thread* thread1;
872 std::thread* thread2;
874SimulateWork2* SimulateWork2::running_work_simulator_ = 0;
895 void (*dart_exit_isolate)(),
896 intptr_t num_threads) {
899 static std::mutex mutex;
900 static std::condition_variable cvar;
901 static intptr_t thread_count = 0;
906 std::unique_lock<std::mutex> lock(mutex);
908 while (thread_count < num_threads) {
913 dart_enter_isolate(isolate);
924 fprintf(stderr,
"IsolateExitTest_LookupAndCallIsolateExit i:%d\n",
i);
937 "%d failed to invoke %s in child isolate: %s, carrying on..\n",
i,
951 printf(
"Running finalizer for weak handle.\n");
988 printf(
"ClosureCallbackThroughHandle %p %p\n",
callback, closureHandle);
996 printf(
"callback() returned an error, propagating error\n");
1008 const bool do_invoke =
i % 3 == 0;
1009 const bool do_gc =
i % 7 == 3;
1042 printf(
"HandleReadFieldValue\n");
1045 printf(
"Dart_PropagateError(field_name)\n");
1050 printf(
"Dart_PropagateError(field_value)\n");
1076 printf(
"ThrowOnReturnOfError is_error %s\n", is_error ?
"true" :
"false");
1085 auto persistent_handle = Dart_NewPersistentHandle_DL(
h);
1087 Dart_Handle handle_2 = Dart_HandleFromPersistent_DL(persistent_handle);
1088 Dart_SetPersistentHandle_DL(persistent_handle,
h);
1089 Dart_DeletePersistentHandle_DL(persistent_handle);
1091 auto weak_handle = Dart_NewWeakPersistentHandle_DL(
1092 handle_2,
reinterpret_cast<void*
>(0x1234), 64,
RunFinalizer);
1093 Dart_Handle return_value = Dart_HandleFromWeakPersistent_DL(weak_handle);
1095 Dart_DeleteWeakPersistentHandle_DL(weak_handle);
1097 return return_value;
1130 *
reinterpret_cast<intptr_t*
>(token) = 42;
1154 return reinterpret_cast<intptr_t
>(ptr);
1166 return new intptr_t(
value);
1178 *
reinterpret_cast<intptr_t*
>(peer) = 0;
1187 return reinterpret_cast<intptr_t
>(
self) +
x;
1197 return reinterpret_cast<intptr_t
>(
self) +
reinterpret_cast<intptr_t
>(other);
1203 return field +
reinterpret_cast<intptr_t
>(other);
1207 intptr_t field1 = 0;
1209 intptr_t field2 = 0;
1211 return field1 + field2;
1217 return reinterpret_cast<intptr_t
>(
self) + field;
1225 if (strcmp(
name,
"Dart_SetNativeInstanceField") == 0 && args_n == 3) {
1228 if (strcmp(
name,
"IsThreadInGenerated") == 0 && args_n == 0) {
1231 if (strcmp(
name,
"ReturnIntPtr") == 0 && args_n == 1) {
1234 if (strcmp(
name,
"PassAsHandle") == 0 && args_n == 1) {
1237 if (strcmp(
name,
"PassAsPointer") == 0 && args_n == 1) {
1240 if (strcmp(
name,
"PassAsPointerAndValue") == 0 && args_n == 2) {
1243 if (strcmp(
name,
"PassAsValueAndPointer") == 0 && args_n == 2) {
1246 if (strcmp(
name,
"AllocateResource") == 0 && args_n == 1) {
1249 if (strcmp(
name,
"DeleteResource") == 0 && args_n == 1) {
1252 if (strcmp(
name,
"GetResourceValue") == 0 && args_n == 1) {
1255 if (strcmp(
name,
"SetResourceFinalizer") == 0 && args_n == 2) {
1258 if (strcmp(
name,
"AddPtrAndInt") == 0 && args_n == 2) {
1261 if (strcmp(
name,
"AddHandleFieldAndInt") == 0 && args_n == 2) {
1264 if (strcmp(
name,
"AddPtrAndPtr") == 0 && args_n == 2) {
1267 if (strcmp(
name,
"AddHandleFieldAndPtr") == 0 && args_n == 2) {
1270 if (strcmp(
name,
"AddHandleFieldAndHandleField") == 0 && args_n == 2) {
1273 if (strcmp(
name,
"AddPtrAndHandleField") == 0 && args_n == 2) {
1276 if (strcmp(
name,
"ReturnIntPtrMethod") == 0 && args_n == 2) {
1292 Dart_ExitIsolate_DL, num_threads);
1299#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID) || \
1300 defined(DART_HOST_OS_MACOS)
1301static bool Regress216834909_hang_at_exit =
true;
1303static void Regress216834909_AtExit() {
1304 if (Regress216834909_hang_at_exit) {
1314 atexit(&Regress216834909_AtExit);
1315 Regress216834909_hang_at_exit =
true;
1318 Regress216834909_hang_at_exit =
false;
1328struct RefCountedResource {
1339 static_cast<RefCountedResource*
>(
malloc(
sizeof(RefCountedResource)));
1355 auto*
resource =
static_cast<RefCountedResource*
>(peer);
1366 Dart_UpdateExternalSize_DL(
nullptr, 0);
1367 Dart_UpdateFinalizableExternalSize_DL(
nullptr,
Dart_Null(), 0);
1376 int currentValueLength,
1377 int textSelectionBase,
1378 int textSelectionExtent,
1382 double scrollPosition,
1383 double scrollExtentMax,
1384 double scrollExtentMin,
1408 FATAL(
"expected Dart_IsString(tooltip)");
1415 if (strcmp(cstr,
"tooltip") != 0) {
1416 printf(
"cstr %s\n", cstr);
1417 FATAL(
"cstr not equal to \"tooltip\"");
1441#define CHECK_STRING(o) \
1442 if (!Dart_IsString(o)) { \
1443 FATAL("expected Dart_IsString"); \
static bool install(SkBitmap *bm, const SkImageInfo &info, const SkRasterHandleAllocator::Rec &rec)
static SkString resource(SkPDFResourceType type, int index)
static void HandleResponse(Dart_Port p, Dart_CObject *message)
void PostAndWait(Dart_Port port, Dart_CObject *object)
PendingCall(void **buffer, size_t *length)
static void StartWorkSimulator()
static void StopWorkSimulator()
static void StartWorkSimulator()
static void StopWorkSimulator()
struct _Dart_Handle * Dart_Handle
struct _Dart_Isolate * Dart_Isolate
Dart_Handle Dart_PersistentHandle
struct _Dart_FinalizableHandle * Dart_FinalizableHandle
intptr_t Dart_InitializeApiDL(void *data)
@ Dart_CObject_kTypedData
@ Dart_CObject_kExternalTypedData
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
FlutterSemanticsFlag flags
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
const uint8_t uint32_t uint32_t GError ** error
Dart_NativeFunction function
#define MSAN_UNPOISON(ptr, len)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
DART_EXPORT void WaitForHelper(HelperThreadState *helper)
DART_EXPORT void StopWorkSimulator()
intptr_t PassAsPointer(void *ptr)
DART_EXPORT void * TestUnprotectCode(void(*fn)(void *))
DART_EXPORT intptr_t TestGC(void(*do_gc)())
DART_EXPORT Dart_Handle Dart_SetFfiNativeResolver(Dart_Handle library, Dart_FfiNativeResolver resolver)
DART_EXPORT void ManyHandles(Dart_Handle o0, Dart_Handle o1, Dart_Handle o2, Dart_Handle o3, Dart_Handle o4, Dart_Handle o5, Dart_Handle o6, Dart_Handle o7, Dart_Handle o8, Dart_Handle o9, Dart_Handle o10, Dart_Handle o11, Dart_Handle o12, Dart_Handle o13, Dart_Handle o14, Dart_Handle o15, Dart_Handle o16, Dart_Handle o17, Dart_Handle o18, Dart_Handle o19)
DART_EXPORT void Dart_PrepareToAbort()
DART_EXPORT Dart_Isolate IGH_CreateIsolate(const char *name, void *peer)
DART_EXPORT Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle(Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
DART_EXPORT intptr_t InitDartApiDL(void *data)
DART_EXPORT void Dart_EnterScope()
DART_EXPORT void SemanticsUpdateBuilderUpdateNode(void *this_, int id, int flags, int actions, int maxValueLength, int currentValueLength, int textSelectionBase, int textSelectionExtent, int platformViewId, int scrollChildren, int scrollIndex, double scrollPosition, double scrollExtentMax, double scrollExtentMin, double left, double top, double right, double bottom, double elevation, double thickness, Dart_Handle label, Dart_Handle labelAttributes, Dart_Handle value, Dart_Handle valueAttributes, Dart_Handle increasedValue, Dart_Handle increasedValueAttributes, Dart_Handle decreasedValue, Dart_Handle decreasedValueAttributes, Dart_Handle hint, Dart_Handle hintAttributes, Dart_Handle tooltip, int textDirection, Dart_Handle transform, Dart_Handle childrenInTraversalOrder, Dart_Handle childrenInHitTestOrder, Dart_Handle localContextActions)
DART_EXPORT Dart_Handle GetRootLibraryUrl()
intptr_t AddPtrAndHandleField(void *self, Dart_Handle other)
DART_EXPORT void * LargePointer()
DART_EXPORT Dart_Handle PassObjectToC(Dart_Handle h)
DART_EXPORT void CollectOnNthAllocation(intptr_t num_allocations)
DART_EXPORT double SmallDouble()
DART_EXPORT void IsolateExitTest_LookupAndCallIsolateExit(int i)
DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate)
DART_EXPORT Dart_Handle Dart_DebugName()
DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, int index, intptr_t *value)
DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target, Dart_Handle name, int number_of_arguments, Dart_Handle *arguments)
intptr_t AddPtrAndPtr(void *self, void *other)
intptr_t * AllocateResource(intptr_t value)
DART_EXPORT Dart_Handle Dart_True()
DART_EXPORT Dart_Handle Dart_RootLibrary()
DART_EXPORT void IGH_StartIsolate(Dart_Isolate child_isolate, int64_t main_isolate_port, const char *library_uri, const char *function_name, bool errors_are_fatal, Dart_Port on_error_port, Dart_Port on_exit_port)
DART_EXPORT bool IsNull(Dart_Handle object)
intptr_t ReturnIntPtr(intptr_t x)
DART_EXPORT Dart_Handle PassObjectToCUseDynamicLinking(Dart_Handle h)
void ClobberAndCall(void(*fn)())
void * malloc(size_t size)
DART_EXPORT void SetArgumentTo42(void *token)
DART_EXPORT void * Dart_ExecuteInternalCommand(const char *command, void *arg)
DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value)
std::function< void()> Work
void Fatal(char const *file, int line, char const *error)
DART_EXPORT void RegisterMyCallbackBlocking(Dart_Port send_port, intptr_t(*callback1)(intptr_t))
DART_EXPORT void Dart_PropagateError(Dart_Handle handle)
DART_EXPORT void TestDeprecatedSymbols()
DART_EXPORT int64_t MinInt32()
DART_EXPORT int64_t HandleReadFieldValue(Dart_Handle handle)
void(* callback_)(Dart_Handle)
DART_EXPORT void ReleaseClosureCallback()
void DummyResourceFinalizer(void *isolate_peer, void *peer)
DART_EXPORT Dart_FinalizableHandle Dart_NewFinalizableHandle(Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
DART_EXPORT const char * Dart_GetError(Dart_Handle handle)
DART_EXPORT RefCountedResource * AllocateRefcountedResource()
DART_EXPORT Dart_Handle Dart_HandleFromWeakPersistent(Dart_WeakPersistentHandle object)
intptr_t PassAsValueAndPointer(intptr_t value, void *ptr)
DART_EXPORT void InvokeClosureCallback()
DART_EXPORT void StopWorkSimulator2()
DART_EXPORT Dart_Handle Dart_GetField(Dart_Handle container, Dart_Handle name)
static void * FfiNativeResolver(const char *name, uintptr_t args_n)
DART_EXPORT void SetFfiNativeResolverForTest(Dart_Handle url)
void NotifyDart(Dart_Port send_port, const Work *work)
DART_EXPORT int64_t MinInt64()
DART_EXPORT void RegisterMyCallbackNonBlocking(Dart_Port send_port, void(*callback)(intptr_t))
DART_EXPORT Dart_Isolate Dart_CurrentIsolate()
intptr_t PassAsPointerAndValue(void *ptr, intptr_t value)
DART_EXPORT void SleepOnAnyOS(intptr_t seconds)
DART_EXPORT void Dart_DumpNativeStackTrace(void *context)
DART_EXPORT const char * Dart_VersionString()
intptr_t AddHandleFieldAndHandleField(Dart_Handle self, Dart_Handle other)
DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
DART_EXPORT Dart_Handle Dart_SetNativeInstanceField(Dart_Handle obj, int index, intptr_t value)
DART_EXPORT void Dart_DeleteWeakPersistentHandle(Dart_WeakPersistentHandle object)
DART_EXPORT Dart_Handle TrueHandle()
intptr_t MyCallbackBlocking(intptr_t a)
void SetResourceFinalizer(Dart_Handle handle, intptr_t *resource)
DART_EXPORT Dart_Isolate Dart_CreateIsolateInGroup(Dart_Isolate group_member, const char *name, Dart_IsolateShutdownCallback shutdown_callback, Dart_IsolateCleanupCallback cleanup_callback, void *child_isolate_data, char **error)
DART_EXPORT void IGH_MsanUnpoison(void *start, intptr_t length)
intptr_t GetResourceValue(intptr_t *resource)
DART_EXPORT bool Dart_RunLoopAsync(bool errors_are_fatal, Dart_Port on_error_port, Dart_Port on_exit_port, char **error)
DART_EXPORT void WaitUntilNThreadsEnterBarrier(intptr_t num_threads)
DART_EXPORT void TriggerGC(uint64_t count)
DART_EXPORT void DecreaseRefcount(void *peer)
static void RunFinalizer(void *isolate_callback_data, void *peer)
DART_EXPORT Dart_Handle ThrowOnReturnOfError(Dart_Handle(*callback)())
DART_EXPORT void RegisterClosureCallback(Dart_Handle h)
DART_EXPORT void Dart_ExitIsolate()
DART_EXPORT void * Calloc(size_t count, size_t size)
std::mutex ref_counted_resource_mutex
void DeleteResource(intptr_t *resource)
DART_EXPORT void ThreadPoolTest_BarrierSync(Dart_Isolate(*dart_current_isolate)(), void(*dart_enter_isolate)(Dart_Isolate), void(*dart_exit_isolate)(), intptr_t num_threads)
DART_EXPORT void StartWorkSimulator()
Dart_Port my_callback_non_blocking_send_port_
void * calloc(size_t n, size_t size)
DART_EXPORT void ExecuteCallback(Work *work_ptr)
intptr_t AddHandleFieldAndInt(Dart_Handle self, intptr_t x)
void MyCallbackNonBlocking(intptr_t a)
DART_EXPORT void Dart_ExitScope()
intptr_t ReturnIntPtrMethod(Dart_Handle self, intptr_t value)
Dart_Port my_callback_blocking_send_port_
DART_EXPORT int64_t PropagateErrorWithoutHandle(Dart_Handle(*callback)())
DART_EXPORT void IncreaseRefcount(RefCountedResource *peer)
void MyCallback2(uint8_t a)
DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url)
DART_EXPORT void ClosureCallbackThroughHandle(void(*callback)(Dart_Handle), Dart_Handle closureHandle)
DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception)
intptr_t AddHandleFieldAndPtr(Dart_Handle self, void *other)
DART_EXPORT void RegisterClosureCallbackFP(void(*callback)(Dart_Handle))
DART_EXPORT bool Dart_IsInteger(Dart_Handle object)
DART_EXPORT bool Dart_IsNull(Dart_Handle object)
DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library)
uint8_t MyCallback1(uint8_t a)
DART_EXPORT Dart_Handle ReturnHandleInCallback(Dart_Handle(*callback)())
DART_EXPORT Dart_Handle Dart_Null()
DART_EXPORT bool Dart_IsString(Dart_Handle object)
intptr_t PassAsHandle(Dart_Handle handle)
const char *const function_name
static int8_t data[kExtLength]
DART_EXPORT uint8_t IsThreadInGenerated()
DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle object, const char **cstr)
DART_EXPORT Dart_Handle Dart_HandleFromPersistent(Dart_PersistentHandle object)
void(* my_callback_non_blocking_fp_)(intptr_t)
DART_EXPORT void RegisterSendPort(Dart_Port send_port)
Dart_PersistentHandle closure_to_callback_
DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char *str)
DART_EXPORT void Regress37069(uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f, uint64_t g, uint64_t h, uint64_t i, uint64_t j, uint64_t k)
DART_EXPORT Dart_PersistentHandle Dart_NewPersistentHandle(Dart_Handle object)
DART_EXPORT void RestoreSIGPIPEHandler()
DART_EXPORT void FreeFinalizer(void *, void *value)
DART_EXPORT void StartWorkSimulator2()
intptr_t AddPtrAndInt(void *self, intptr_t x)
DART_EXPORT Dart_Handle Dart_IntegerToInt64(Dart_Handle integer, int64_t *value)
intptr_t(* my_callback_blocking_fp_)(intptr_t)
DART_EXPORT Dart_Handle HandleRecursion(Dart_Handle object, Dart_Handle(*callback)(int64_t), int64_t i)
DART_EXPORT void * UnprotectCodeOtherThread(void *isolate, std::condition_variable *var, std::mutex *mut)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service port
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
struct _Dart_CObject::@86::@87 as_send_port
Dart_HandleFinalizer callback
union _Dart_CObject::@86 value
struct _Dart_CObject::@86::@90 as_typed_data
struct _Dart_CObject::@86::@91 as_external_typed_data
struct _Dart_CObject::@86::@89 as_array
struct _Dart_CObject ** values
std::unique_ptr< std::thread > helper
std::condition_variable cvar