Chromium Code Reviews| Index: runtime/bin/extensions_linux.cc |
| diff --git a/runtime/bin/extensions_linux.cc b/runtime/bin/extensions_linux.cc |
| index df4df5895e30641075aff47ad42173554576a4ea..e0c65740bb0a9d2202547e6321281e72a05d521b 100644 |
| --- a/runtime/bin/extensions_linux.cc |
| +++ b/runtime/bin/extensions_linux.cc |
| @@ -5,11 +5,13 @@ |
| #include "bin/extensions.h" |
| #include <dlfcn.h> |
| -void* Extensions::LoadExtensionLibrary(const char* library_name) { |
| - const char* strings[4] = { "./lib", library_name, ".so", NULL }; |
| - char* library_path = Concatenate(strings); |
| - void* lib_handle = dlopen(library_path, RTLD_LAZY); |
| - free(library_path); |
| +void* Extensions::LoadExtensionLibrary(const char* library_path, |
| + const char* extension_name) { |
| + const char* strings[5] = { library_path, "/lib", |
|
Mads Ager (google)
2012/03/15 08:44:09
Does this work if library_path is the empty string
Bill Hesse
2012/03/15 13:08:54
The library_path should always be an absolute file
|
| + extension_name, ".so", NULL }; |
| + char* library_file = Concatenate(strings); |
| + void* lib_handle = dlopen(library_file, RTLD_LAZY); |
| + free(library_file); |
| return lib_handle; |
| } |