7#include "flutter/fml/logging.h"
12#include <zircon/syscalls.h>
14static void HandleFree(
void* isolate_callback_data,
void* peer) {
29 if (handle->
handle != ZX_HANDLE_INVALID) {
37 zx_status_t status = zx_handle_close(handle->
handle);
38 handle->
handle = ZX_HANDLE_INVALID;
39 if (status == ZX_OK) {
47 if (!handle || (handle->
handle == ZX_HANDLE_INVALID)) {
56 intptr_t external_allocation_size) {
58 object, pointer, external_allocation_size,
HandleFree);
60 if (weak_handle ==
nullptr) {
61 FML_LOG(
ERROR) <<
"Unable to attach finalizer: " << std::hex << pointer;
71 intptr_t external_allocation_size) {
75 if (weak_handle ==
nullptr) {
76 FML_LOG(
ERROR) <<
"Unable to attach finalizer: " << std::hex << pointer;
101 data->push_back(handle);
struct _Dart_Handle * Dart_Handle
struct _Dart_FinalizableHandle * Dart_FinalizableHandle
int32_t zircon_dart_handle_close(zircon_dart_handle_t *handle)
void zircon_dart_handle_list_append(zircon_dart_handle_list_t *list, zircon_dart_handle_t *handle)
zircon_dart_handle_list_t * zircon_dart_handle_list_create()
HandleVector * HandleVectorPtr
static void HandlePairFree(void *isolate_callback_data, void *peer)
int32_t zircon_dart_handle_is_valid(zircon_dart_handle_t *handle)
void zircon_dart_handle_free(zircon_dart_handle_t *handle)
int zircon_dart_handle_attach_finalizer(Dart_Handle object, void *pointer, intptr_t external_allocation_size)
std::vector< zircon_dart_handle_t * > HandleVector
void zircon_dart_handle_list_free(zircon_dart_handle_list_t *list)
int zircon_dart_handle_pair_attach_finalizer(Dart_Handle object, void *pointer, intptr_t external_allocation_size)
static void HandleFree(void *isolate_callback_data, void *peer)
#define FML_LOG(severity)
#define FML_CHECK(condition)
void * malloc(size_t size)
std::shared_ptr< const fml::Mapping > data