Bug 711144 - Prepend LD_LIBRARY_PATH instead of appending to it when starting plugin-container. r=bsmedberg
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 28 Dec 2011 08:23:42 +0100
changeset 84130 f7279332f966822dd4909b879815b0006118597e
parent 84129 6e2e25fc37131e7ba01a23ce348d00db6e3df85d
child 84131 860035a3c04a07e541173b8a9a3eee1ffaaaf8c9
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs711144
milestone12.0a1
Bug 711144 - Prepend LD_LIBRARY_PATH instead of appending to it when starting plugin-container. r=bsmedberg
ipc/glue/GeckoChildProcessHost.cpp
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -447,19 +447,19 @@ GeckoChildProcessHost::PerformAsyncLaunc
         greDir->GetNativePath(path);
 # ifdef OS_LINUX
 #  ifdef MOZ_WIDGET_ANDROID
         path += "/lib";
 #  endif  // MOZ_WIDGET_ANDROID
         const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
         nsCString new_ld_lib_path;
         if (ld_library_path && *ld_library_path) {
-            new_ld_lib_path.Assign(ld_library_path);
+            new_ld_lib_path.Assign(path.get());
             new_ld_lib_path.AppendLiteral(":");
-            new_ld_lib_path.Append(path.get());
+            new_ld_lib_path.Append(ld_library_path);
             newEnvVars["LD_LIBRARY_PATH"] = new_ld_lib_path.get();
         } else {
             newEnvVars["LD_LIBRARY_PATH"] = path.get();
         }
 # elif OS_MACOSX
         newEnvVars["DYLD_LIBRARY_PATH"] = path.get();
         // XXX DYLD_INSERT_LIBRARIES should only be set when launching a plugin
         //     process, and has no effect on other subprocesses (the hooks in