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

Unified Diff: base/native_library_mac.mm

Issue 551181: Load bundle resources when loading bundles on the Mac (Closed)
Patch Set: Created 10 years, 11 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 | « base/native_library.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « base/native_library.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698