#include "handle.h"
#include "flutter/fml/logging.h"
#include <iostream>
#include <vector>
#include <zircon/syscalls.h>
Go to the source code of this file.
◆ HandleVector
◆ HandleVectorPtr
◆ HandleFree()
static void HandleFree |
( |
void * |
isolate_callback_data, |
|
|
void * |
peer |
|
) |
| |
|
static |
Definition at line 14 of file handle.cc.
14 {
18}
void zircon_dart_handle_free(zircon_dart_handle_t *handle)
#define FML_CHECK(condition)
◆ HandlePairFree()
static void HandlePairFree |
( |
void * |
isolate_callback_data, |
|
|
void * |
peer |
|
) |
| |
|
static |
Definition at line 20 of file handle.cc.
20 {
24 free(handle_pair);
25}
◆ zircon_dart_handle_attach_finalizer()
int zircon_dart_handle_attach_finalizer |
( |
Dart_Handle |
object, |
|
|
void * |
pointer, |
|
|
intptr_t |
external_allocation_size |
|
) |
| |
Definition at line 54 of file handle.cc.
56 {
58 object, pointer, external_allocation_size,
HandleFree);
59
60 if (weak_handle == nullptr) {
61 FML_LOG(
ERROR) <<
"Unable to attach finalizer: " << std::hex << pointer;
62 return -1;
63 }
64
65 return 1;
66}
struct _Dart_FinalizableHandle * Dart_FinalizableHandle
static void HandleFree(void *isolate_callback_data, void *peer)
#define FML_LOG(severity)
◆ zircon_dart_handle_close()
Definition at line 35 of file handle.cc.
35 {
37 zx_status_t status = zx_handle_close(handle->
handle);
38 handle->
handle = ZX_HANDLE_INVALID;
39 if (status == ZX_OK) {
40 return 1;
41 } else {
42 return 0;
43 }
44}
◆ zircon_dart_handle_free()
Definition at line 27 of file handle.cc.
27 {
29 if (handle->
handle != ZX_HANDLE_INVALID) {
31 }
32 free(handle);
33}
int32_t zircon_dart_handle_close(zircon_dart_handle_t *handle)
◆ zircon_dart_handle_is_valid()
Definition at line 46 of file handle.cc.
46 {
47 if (!handle || (handle->
handle == ZX_HANDLE_INVALID)) {
48 return 0;
49 } else {
50 return 1;
51 }
52}
◆ zircon_dart_handle_list_append()
Definition at line 95 of file handle.cc.
96 {
101 data->push_back(handle);
102}
HandleVector * HandleVectorPtr
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
◆ zircon_dart_handle_list_create()
Definition at line 87 of file handle.cc.
87 {
93}
std::vector< zircon_dart_handle_t * > HandleVector
void * malloc(size_t size)
◆ zircon_dart_handle_list_free()
Definition at line 104 of file handle.cc.
104 {
108 free(list);
109}
◆ zircon_dart_handle_pair_attach_finalizer()
int zircon_dart_handle_pair_attach_finalizer |
( |
Dart_Handle |
object, |
|
|
void * |
pointer, |
|
|
intptr_t |
external_allocation_size |
|
) |
| |
Definition at line 68 of file handle.cc.
71 {
74
75 if (weak_handle == nullptr) {
76 FML_LOG(
ERROR) <<
"Unable to attach finalizer: " << std::hex << pointer;
77 return -1;
78 }
79
80 return 1;
81}
static void HandlePairFree(void *isolate_callback_data, void *peer)