Chromium Code Reviews| Index: base/native_library_mac.mm |
| diff --git a/base/native_library_mac.mm b/base/native_library_mac.mm |
| index 63ac9df5a9fb13dba9118ee58a04fa4f95c9ec23..8aaeeb12ff0dde6fabfce20aca6f32a501d0e1ad 100644 |
| --- a/base/native_library_mac.mm |
| +++ b/base/native_library_mac.mm |
| @@ -40,15 +40,19 @@ NativeLibrary LoadNativeLibrary(const FilePath& library_path) { |
| NativeLibrary native_lib = new NativeLibraryStruct(); |
| native_lib->type = BUNDLE; |
| native_lib->bundle = bundle; |
| + native_lib->bundle_resource_ref = CFBundleOpenBundleResourceMap(bundle); |
| return native_lib; |
| } |
| // static |
| void UnloadNativeLibrary(NativeLibrary library) { |
| - if (library->type == BUNDLE) |
| + if (library->type == BUNDLE) { |
| + CFBundleCloseBundleResourceMap(library->bundle, |
| + library->bundle_resource_ref); |
|
Avi (use Gerrit)
2010/01/28 14:46:47
What if there was no resource map and the open cal
stuartmorgan
2010/01/28 15:24:37
The docs say nothing about returning -1 (or anythi
|
| CFRelease(library->bundle); |
| - else |
| + } else { |
| dlclose(library->dylib); |
| + } |
| delete library; |
| } |