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

Unified Diff: runtime/bin/extensions_linux.cc

Issue 9694045: Change lookup path for Dart native extensions shared libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix isAbsolutePath, remove trailing whitespace. Created 8 years, 9 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_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",
Ivan Posva 2012/03/15 16:18:20 Just leave out the size. You are NULL terminating
Bill Hesse 2012/04/17 14:46:31 Done.
+ extension_name, ".so", NULL };
+ char* library_file = Concatenate(strings);
+ void* lib_handle = dlopen(library_file, RTLD_LAZY);
+ free(library_file);
return lib_handle;
}

Powered by Google App Engine
This is Rietveld 408576698