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

Unified Diff: runtime/bin/extensions_android.cc

Issue 2694103004: Cleanup app snapshots on isolate/vm exit. (Closed)
Patch Set: merge Created 3 years, 10 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/extensions.cc ('k') | runtime/bin/extensions_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/extensions_android.cc
diff --git a/runtime/bin/extensions_android.cc b/runtime/bin/extensions_android.cc
index 85b20aebbe0597170d2f1b4c3778fa4a90e10f23..2fff7bbb58f80f76b0f200dcf1f1396da6271489 100644
--- a/runtime/bin/extensions_android.cc
+++ b/runtime/bin/extensions_android.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) {
« no previous file with comments | « runtime/bin/extensions.cc ('k') | runtime/bin/extensions_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698