7#include "flutter/fml/logging.h"
8#include "flutter/fml/macros.h"
13#include <lib/zx/channel.h>
14#include <zircon/types.h>
24 zx_handle_t out0 = 0, out1 = 0;
25 zx_status_t status = zx_channel_create(
options, &out0, &out1);
26 if (status != ZX_OK) {
40 if (!handle || (handle->
handle == ZX_HANDLE_INVALID)) {
41 return ZX_ERR_BAD_HANDLE;
44 std::vector<zx_handle_t> zx_handles;
45 std::vector<zircon_dart_handle_t*> handle_data =
46 *
reinterpret_cast<std::vector<zircon_dart_handle_t*>*
>(handles->
data);
47 for (
auto handle_ptr : handle_data) {
48 zx_handles.push_back(handle_ptr->handle);
53 zx_handles.data(), zx_handles.size());
56 for (
auto handle_ptr : handle_data) {
57 handle_ptr->handle = ZX_HANDLE_INVALID;
int32_t zircon_dart_channel_write(zircon_dart_handle_t *handle, zircon_dart_byte_array_t *bytes, zircon_dart_handle_list_t *handles)
static zircon_dart_handle_t * MakeHandle(zx_handle_t handle)
zircon_dart_handle_pair_t * zircon_dart_channel_create(uint32_t options)
void * malloc(size_t size)