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

Unified Diff: runtime/bin/extensions_android.cc

Issue 2694103004: Cleanup app snapshots on isolate/vm exit. (Closed)
Patch Set: . 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
Index: runtime/bin/extensions_android.cc
diff --git a/runtime/bin/extensions_android.cc b/runtime/bin/extensions_android.cc
index 85b20aebbe0597170d2f1b4c3778fa4a90e10f23..fc34dc3b5da1524b1f32184f8a185b313303da69 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,7 +19,7 @@ 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);
}
@@ -26,6 +28,11 @@ void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
return dlsym(lib_handle, symbol);
}
+void Extensions::UnloadLibrary(void* lib_handle) {
zra 2017/02/15 04:41:40 Two newlines between functions.
rmacnak 2017/02/16 03:05:30 Done.
+ int result = dlclose(lib_handle);
zra 2017/02/15 04:41:40 Do you need to dlerror() to clear the errors first
rmacnak 2017/02/16 03:05:30 Yes, done.
+ ASSERT(result == 0);
+}
+
Dart_Handle Extensions::GetError() {
const char* err_str = dlerror();
if (err_str != NULL) {

Powered by Google App Engine
This is Rietveld 408576698