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

Unified Diff: base/native_library_linux.cc

Issue 2268002: Implemented mid-level Negotiate protocol for Posix. (Closed)
Patch Set: Merged with trunk. Created 10 years, 7 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') | base/native_library_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/native_library_linux.cc
diff --git a/base/native_library_linux.cc b/base/native_library_linux.cc
index 99e32c6229ecd6c71f1ef840662a403586a3e329..f31c799b6459f6e9cc2e405e2b0f538c26e7cc95 100644
--- a/base/native_library_linux.cc
+++ b/base/native_library_linux.cc
@@ -45,7 +45,9 @@ void UnloadNativeLibrary(NativeLibrary library) {
// static
void* GetFunctionPointerFromNativeLibrary(NativeLibrary library,
const char* name) {
- return dlsym(library, name);
+ DCHECK(name != NULL) << "NULL name passed in.";
+ void* lib = dlsym(library, name);
+ return lib;
}
// static
@@ -53,4 +55,15 @@ string16 GetNativeLibraryName(const string16& name) {
return ASCIIToUTF16("lib") + name + ASCIIToUTF16(".so");
}
+string16 GetLibraryErrorMessage() {
+ const char* last_err_message = dlerror();
+ string16 err_message;
+
+ if (last_err_message) {
+ err_message = ASCIIToUTF16(last_err_message);
+ }
+
+ return err_message;
+}
+
} // namespace base
« no previous file with comments | « base/native_library.h ('k') | base/native_library_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698