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

Unified Diff: runtime/bin/extensions_win.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_win.cc
diff --git a/runtime/bin/extensions_win.cc b/runtime/bin/extensions_win.cc
index b07bf590130301506211d8c8264b7b9fe1696019..be49910314bcdc84925a3149edf974db391e586c 100644
--- a/runtime/bin/extensions_win.cc
+++ b/runtime/bin/extensions_win.cc
@@ -8,6 +8,7 @@
#include "bin/extensions.h"
#include "bin/utils.h"
#include "bin/utils_win.h"
+#include "platform/assert.h"
namespace dart {
namespace bin {
@@ -18,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) {
SetLastError(0);
// Convert to wchar_t string.
@@ -37,6 +38,11 @@ void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
return GetProcAddress(reinterpret_cast<HMODULE>(lib_handle), symbol);
}
+void Extensions::UnloadLibrary(void* lib_handle) {
+ BOOL result = FreeLibrary(reinterpret_cast<HMODULE>(lib_handle));
+ ASSERT(result);
+}
+
Dart_Handle Extensions::GetError() {
int last_error = GetLastError();
if (last_error != 0) {

Powered by Google App Engine
This is Rietveld 408576698