summaryrefslogtreecommitdiffstats
path: root/base/native_library_linux.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 21:53:16 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 21:53:16 +0000
commitbe13068b97a3aac41cad8a77f1b8626b29aaa934 (patch)
tree082bc2f007d41f6c79e5675a16d5c0f914ca8643 /base/native_library_linux.cc
parenta6152af0508075b978b4f73e1bd74f0e8cd3bb7f (diff)
downloadchromium_src-be13068b97a3aac41cad8a77f1b8626b29aaa934.zip
chromium_src-be13068b97a3aac41cad8a77f1b8626b29aaa934.tar.gz
chromium_src-be13068b97a3aac41cad8a77f1b8626b29aaa934.tar.bz2
ThreadRestrictions: mark library loading functions as doing IO
Remove the hack we used for checking that plugins didn't regress, as this is a generalization of that idea. Review URL: http://codereview.chromium.org/4161004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66003 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/native_library_linux.cc')
-rw-r--r--base/native_library_linux.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/native_library_linux.cc b/base/native_library_linux.cc
index b6d7aef..d5ab128 100644
--- a/base/native_library_linux.cc
+++ b/base/native_library_linux.cc
@@ -8,12 +8,16 @@
#include "base/file_path.h"
#include "base/logging.h"
+#include "base/thread_restrictions.h"
#include "base/utf_string_conversions.h"
namespace base {
// static
NativeLibrary LoadNativeLibrary(const FilePath& library_path) {
+ // dlopen() opens the file off disk.
+ base::ThreadRestrictions::AssertIOAllowed();
+
// We deliberately do not use RTLD_DEEPBIND. For the history why, please
// refer to the bug tracker. Some useful bug reports to read include:
// http://crbug.com/17943, http://crbug.com/17557, http://crbug.com/36892,