Index: content/browser/zygote_main_linux.cc |
diff --git a/content/browser/zygote_main_linux.cc b/content/browser/zygote_main_linux.cc |
index 188ad34f62b43d253f3e45fc28709798d844b5f8..0b120923942bc3cc5b10b7e611605c74ba3f6d9c 100644 |
--- a/content/browser/zygote_main_linux.cc |
+++ b/content/browser/zygote_main_linux.cc |
@@ -36,6 +36,7 @@ |
#include "base/sys_info.h" |
#include "build/build_config.h" |
#include "chrome/common/chrome_descriptors.h" |
+#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/font_config_ipc_linux.h" |
#include "chrome/common/main_function_params.h" |
@@ -596,9 +597,12 @@ static void PreSandboxInit() { |
// cached and there's no more need to access the file system. |
scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); |
- FilePath module_path; |
- if (PathService::Get(base::DIR_MODULE, &module_path)) |
- media::InitializeMediaLibrary(module_path); |
+ // If we can't get a path to load media libraries from, or if loading |
+ // them fails, we'll crash if we try to call into them. Code should |
+ // be sure to check media::IsMediaLibraryInitialized() before doing so! |
awong
2011/02/25 02:41:59
Exclamations are discouraged in comments :)
|
+ FilePath media_path; |
+ if (PathService::Get(chrome::DIR_MEDIA_LIBS, &media_path)) |
+ media::InitializeMediaLibrary(media_path); |
// Ensure access to the Pepper plugins before the sandbox is turned on. |
PepperPluginRegistry::PreloadModules(); |