Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: runtime/bin/extensions_fuchsia.cc

Issue 2774993002: Standalone support for AOT as dylibs on Fuchsia. (Closed)
Patch Set: gn format Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/extensions_fuchsia.cc
diff --git a/runtime/bin/extensions_fuchsia.cc b/runtime/bin/extensions_fuchsia.cc
index a954207e03e9ae1648c1d4529e47eacad69a80ca..09c7484eeb59db302945932a3a95f49d4e6420c8 100644
--- a/runtime/bin/extensions_fuchsia.cc
+++ b/runtime/bin/extensions_fuchsia.cc
@@ -6,7 +6,10 @@
#if defined(HOST_OS_FUCHSIA)
#include "bin/extensions.h"
-#include <dlfcn.h> // NOLINT
+
+#include <dlfcn.h>
+#include <launchpad/vmo.h>
+#include <magenta/dlfcn.h>
#include "platform/assert.h"
@@ -20,7 +23,11 @@ const char* kIsolateSnapshotInstructionsSymbolName =
"_kDartIsolateSnapshotInstructions";
void* Extensions::LoadExtensionLibrary(const char* library_file) {
- return dlopen(library_file, RTLD_LAZY);
+ mx_handle_t vmo = launchpad_vmo_from_file(library_file);
+ if (vmo <= 0) {
+ return NULL;
+ }
+ return dlopen_vmo(vmo, RTLD_LAZY);
}
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698