Index: runtime/bin/extensions_macos.cc |
diff --git a/runtime/bin/extensions_macos.cc b/runtime/bin/extensions_macos.cc |
index d994c17bd163aae0dbaf704952d8f343ceb83982..f65a04527da6fccf05e2e940c8b3fe1a2f73ae78 100644 |
--- a/runtime/bin/extensions_macos.cc |
+++ b/runtime/bin/extensions_macos.cc |
@@ -8,6 +8,8 @@ |
#include "bin/extensions.h" |
#include <dlfcn.h> // NOLINT |
+#include "platform/assert.h" |
+ |
namespace dart { |
namespace bin { |
@@ -17,15 +19,24 @@ const char* kIsolateSnapshotDataSymbolName = "kDartIsolateSnapshotData"; |
const char* kIsolateSnapshotInstructionsSymbolName = |
"kDartIsolateSnapshotInstructions"; |
-void* Extensions::LoadExtensionLibrary(const char* library_file) { |
+void* Extensions::LoadLibrary(const char* library_file) { |
return dlopen(library_file, RTLD_LAZY); |
} |
+ |
void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) { |
dlerror(); |
return dlsym(lib_handle, symbol); |
} |
+ |
+void Extensions::UnloadLibrary(void* lib_handle) { |
+ dlerror(); |
+ int result = dlclose(lib_handle); |
+ ASSERT(result == 0); |
+} |
+ |
+ |
Dart_Handle Extensions::GetError() { |
const char* err_str = dlerror(); |
if (err_str != NULL) { |