A mapping to a buffer for a file that has been loaded into a namespace.
More...
#include <file_in_namespace_buffer.h>
A mapping to a buffer for a file that has been loaded into a namespace.
Definition at line 12 of file file_in_namespace_buffer.h.
◆ FileInNamespaceBuffer()
flutter_runner::FileInNamespaceBuffer::FileInNamespaceBuffer |
( |
int |
namespace_fd, |
|
|
const char * |
path, |
|
|
bool |
executable |
|
) |
| |
Loads the file at |path| into the namespace |namespace_fd|, creating a mapping to the loaded buffer.
The file will be loaded with the readable permission. If |executable| is true, the file will also be loaded with the executable permission.
Definition at line 20 of file file_in_namespace_buffer.cc.
23 : address_(nullptr), size_(0) {
24 fuchsia::mem::Buffer
buffer;
27 return;
28 }
29
30 uint32_t
flags = ZX_VM_PERM_READ;
31 if (executable) {
32 flags |= ZX_VM_PERM_EXECUTE;
33 }
34
36 const zx_status_t status =
38 if (status != ZX_OK) {
40 << zx_status_get_string(status);
41 }
42
43 address_ =
reinterpret_cast<void*
>(
addr);
45}
FlutterSemanticsFlag flags
#define FML_LOG(severity)
bool VmoFromFilenameAt(int dirfd, const std::string &filename, bool executable, fuchsia::mem::Buffer *buffer)
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
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
◆ ~FileInNamespaceBuffer()
flutter_runner::FileInNamespaceBuffer::~FileInNamespaceBuffer |
( |
| ) |
|
Definition at line 47 of file file_in_namespace_buffer.cc.
47 {
48 if (address_ != nullptr) {
49 zx::vmar::root_self()->unmap(reinterpret_cast<uintptr_t>(address_), size_);
50 address_ = nullptr;
51 size_ = 0;
52 }
53}
◆ GetMapping()
const uint8_t * flutter_runner::FileInNamespaceBuffer::GetMapping |
( |
| ) |
const |
|
overridevirtual |
◆ GetSize()
size_t flutter_runner::FileInNamespaceBuffer::GetSize |
( |
| ) |
const |
|
overridevirtual |
◆ IsDontNeedSafe()
bool flutter_runner::FileInNamespaceBuffer::IsDontNeedSafe |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files: