diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 01:25:09 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 01:25:09 +0000 |
commit | e46b5a095b408fcb14b694e5176a07cb855afd6b (patch) | |
tree | 0b4f9b54290b5385f522898e25fa77e961663954 /chrome/renderer | |
parent | 89715c9a225cb6bffe121693ca970700aa63ecd0 (diff) | |
download | chromium_src-e46b5a095b408fcb14b694e5176a07cb855afd6b.zip chromium_src-e46b5a095b408fcb14b694e5176a07cb855afd6b.tar.gz chromium_src-e46b5a095b408fcb14b694e5176a07cb855afd6b.tar.bz2 |
Internal plugin needs to be loaded in a different place for the Linux sandbox.
Review URL: http://codereview.chromium.org/2817012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50066 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_process_impl.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc index 71786e2..ff64177 100644 --- a/chrome/renderer/render_process_impl.cc +++ b/chrome/renderer/render_process_impl.cc @@ -182,14 +182,16 @@ RenderProcessImpl::RenderProcessImpl() } #endif - // Load the pdf plugin before the sandbox is turned on. +#if defined(OS_WIN) or defined(OS_MACOSX) + // Load the pdf plugin before the sandbox is turned on. This is for Mac and + // Windows. On Linux, this needs to be done in the zygote process. FilePath pdf; if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && file_util::PathExists(pdf)) { static scoped_refptr<NPAPI::PluginLib> pdf_lib = NPAPI::PluginLib::CreatePluginLib(pdf); - // Load the plugin now before the sandbox engages and keep it always loaded. - pdf_lib->EnsureAlwaysLoaded(); + bool rv = pdf_lib->EnsureAlwaysLoaded(); + DCHECK(rv) << "Couldn't load PDF plugin"; #if defined(OS_WIN) g_iat_patch_createdca.Patch( @@ -200,6 +202,7 @@ RenderProcessImpl::RenderProcessImpl() "gdi32.dll", "GetFontData", GetFontDataPatch); #endif } +#endif } RenderProcessImpl::~RenderProcessImpl() { |