diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-31 18:22:30 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-03 14:41:31 -0700 |
commit | 55e7a901112249ba6b8e932fd46c5136b29f2196 (patch) | |
tree | 4afdbbf4a942b493800c5433ac790b85eab36f5f | |
parent | bb6d8573128682769298ab12f35f8f60143b9546 (diff) |
do no run cleanups on dlclose of self
-rw-r--r-- | src/library.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js index ddcf926d..8bff19fa 100644 --- a/src/library.js +++ b/src/library.js @@ -5102,7 +5102,9 @@ LibraryManager.library = { } else { var lib_record = DLFCN_DATA.loadedLibs[handle]; if (--lib_record.refcount == 0) { - lib_record.module.cleanups.forEach(function(cleanup) { cleanup() }); + if (lib_record.module.cleanups) { + lib_record.module.cleanups.forEach(function(cleanup) { cleanup() }); + } delete DLFCN_DATA.loadedLibNames[lib_record.name]; delete DLFCN_DATA.loadedLibs[handle]; } |