mapped_resource.cc
imports <zircon/dlfcn.h>imports flutter/shell/platform/fuchsia/runtime/dart/utils/inlines.h
SHA-25680dd4c034dd6fb01984c4d65edee2f2f5a0fe8e8d3fc3e1a359374de7dac2bf3
MaleculeMd(In₄)
Evidence
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/shell/platform/fuchsia/runtime/dart/utils/mapped_resource.h"
6
7#include <dlfcn.h>
8#include <fcntl.h>
9#include <fuchsia/io/cpp/fidl.h>
10#include <fuchsia/mem/cpp/fidl.h>
11#include <lib/fdio/directory.h>
12#include <lib/fdio/io.h>
13#include <lib/trace/event.h>
14#include <sys/mman.h>
15#include <sys/stat.h>
16#include <sys/types.h>
17#include <zircon/dlfcn.h>
18#include <zircon/status.h>
19
20#include "flutter/fml/logging.h"
21#include "flutter/shell/platform/fuchsia/runtime/dart/utils/inlines.h"
22#include "flutter/shell/platform/fuchsia/runtime/dart/utils/vmo.h"
23#include "third_party/dart/runtime/include/dart_api.h"
24
25namespace dart_utils {
26
27static bool OpenVmo(fuchsia::mem::Buffer* resource_vmo,
28 …
37:14… false;
38 }
39 } else {
40 // openat of a path with a leading '/' ignores the namespace fd.
41 // require a relative path.
42 FML_CHECK(path[0] ! …
137:19… ()) {
138 FML_LOG(ERROR) << "Failed to open VMO for " << path << " from dir.";
139 return false;
140 }
⋯4 lines