| Index: runtime/bin/extensions_fuchsia.cc
|
| diff --git a/runtime/bin/extensions_fuchsia.cc b/runtime/bin/extensions_fuchsia.cc
|
| index cc80a5804fdd4dcc0f9800a658e89714cc4322ba..aea8dc3660d3ec079101cfecf398a25357d472d7 100644
|
| --- a/runtime/bin/extensions_fuchsia.cc
|
| +++ b/runtime/bin/extensions_fuchsia.cc
|
| @@ -8,8 +8,10 @@
|
| #include "bin/extensions.h"
|
|
|
| #include <dlfcn.h>
|
| +#include <fcntl.h>
|
| #include <launchpad/vmo.h>
|
| #include <magenta/dlfcn.h>
|
| +#include <mxio/io.h>
|
|
|
| #include "platform/assert.h"
|
|
|
| @@ -23,8 +25,14 @@ const char* kIsolateSnapshotInstructionsSymbolName =
|
| "_kDartIsolateSnapshotInstructions";
|
|
|
| void* Extensions::LoadExtensionLibrary(const char* library_file) {
|
| - mx_handle_t vmo = launchpad_vmo_from_file(library_file);
|
| - if (vmo <= 0) {
|
| + int fd = open(library_file, O_RDONLY);
|
| + if (fd < 0) {
|
| + return NULL;
|
| + }
|
| + mx_handle_t vmo;
|
| + mx_status_t status = mxio_get_vmo(fd, &vmo);
|
| + close(fd);
|
| + if (status != MX_OK) {
|
| return NULL;
|
| }
|
| return dlopen_vmo(vmo, RTLD_LAZY);
|
|
|